Commit e756ffe5 authored by lixiaofang's avatar lixiaofang

add

parent 477fb158
...@@ -42,14 +42,14 @@ ...@@ -42,14 +42,14 @@
<entry key="comment" value="59" /> <entry key="comment" value="59" />
<entry key="dummy" value="6" /> <entry key="dummy" value="6" />
<entry key="guanshui" value="2" /> <entry key="guanshui" value="2" />
<entry key="py" value="3471" /> <entry key="py" value="3628" />
<entry key="xuqiu" value="223" /> <entry key="xuqiu" value="223" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.types.edit"> <usages-collector id="statistics.file.types.edit">
<counts> <counts>
<entry key="PLAIN_TEXT" value="290" /> <entry key="PLAIN_TEXT" value="290" />
<entry key="Python" value="3471" /> <entry key="Python" value="3628" />
</counts> </counts>
</usages-collector> </usages-collector>
</session> </session>
...@@ -120,8 +120,8 @@ ...@@ -120,8 +120,8 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/auto_at_once.py"> <entry file="file://$PROJECT_DIR$/auto_at_once.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="145"> <state relative-caret-position="270">
<caret line="32" lean-forward="true" selection-start-line="32" selection-end-line="32" /> <caret line="18" column="152" lean-forward="true" selection-start-line="18" selection-start-column="116" selection-end-line="18" selection-end-column="152" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -144,8 +144,8 @@ ...@@ -144,8 +144,8 @@
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/offline_comment.py"> <entry file="file://$PROJECT_DIR$/offline_comment.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="81"> <state relative-caret-position="420">
<caret line="61" column="30" selection-start-line="61" selection-start-column="30" selection-end-line="61" selection-end-column="30" /> <caret line="63" column="29" selection-start-line="63" selection-start-column="29" selection-end-line="63" selection-end-column="29" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
...@@ -282,10 +282,10 @@ ...@@ -282,10 +282,10 @@
</list> </list>
</option> </option>
</component> </component>
<component name="ProjectFrameBounds" extendedState="6"> <component name="ProjectFrameBounds">
<option name="y" value="23" /> <option name="y" value="23" />
<option name="width" value="1280" /> <option name="width" value="1280" />
<option name="height" value="724" /> <option name="height" value="725" />
</component> </component>
<component name="ProjectView"> <component name="ProjectView">
<navigator proportions="" version="1"> <navigator proportions="" version="1">
...@@ -495,7 +495,7 @@ ...@@ -495,7 +495,7 @@
<servers /> <servers />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="0" y="23" width="1280" height="725" extended-state="6" /> <frame x="0" y="23" width="1280" height="725" extended-state="0" />
<editor active="true" /> <editor active="true" />
<layout> <layout>
<window_info id="Structure" order="0" sideWeight="0.21188119" side_tool="true" weight="0.19112115" /> <window_info id="Structure" order="0" sideWeight="0.21188119" side_tool="true" weight="0.19112115" />
...@@ -510,7 +510,7 @@ ...@@ -510,7 +510,7 @@
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" /> <window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" /> <window_info anchor="bottom" id="Version Control" order="7" show_stripe_button="false" />
<window_info active="true" anchor="bottom" id="Terminal" order="8" visible="true" weight="0.3295082" /> <window_info active="true" anchor="bottom" id="Terminal" order="8" visible="true" weight="0.0" />
<window_info anchor="bottom" id="Event Log" order="9" side_tool="true" /> <window_info anchor="bottom" id="Event Log" order="9" side_tool="true" />
<window_info anchor="bottom" id="Python Console" order="10" /> <window_info anchor="bottom" id="Python Console" order="10" />
<window_info anchor="bottom" id="DB Execution Console" order="11" /> <window_info anchor="bottom" id="DB Execution Console" order="11" />
...@@ -867,16 +867,6 @@ ...@@ -867,16 +867,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_at_once.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="145">
<caret line="32" lean-forward="true" selection-start-line="32" selection-end-line="32" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/instant.py"> <entry file="file://$PROJECT_DIR$/instant.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="300"> <state relative-caret-position="300">
...@@ -927,10 +917,20 @@ ...@@ -927,10 +917,20 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/auto_at_once.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="18" column="152" lean-forward="true" selection-start-line="18" selection-start-column="116" selection-end-line="18" selection-end-column="152" />
<folding>
<element signature="e#0#15#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/offline_comment.py"> <entry file="file://$PROJECT_DIR$/offline_comment.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="81"> <state relative-caret-position="420">
<caret line="61" column="30" selection-start-line="61" selection-start-column="30" selection-end-line="61" selection-end-column="30" /> <caret line="63" column="29" selection-start-line="63" selection-start-column="29" selection-end-line="63" selection-end-column="29" />
<folding> <folding>
<element signature="e#0#15#0" expanded="true" /> <element signature="e#0#15#0" expanded="true" />
</folding> </folding>
......
...@@ -39,17 +39,28 @@ def reply(id, content, user_id): ...@@ -39,17 +39,28 @@ def reply(id, content, user_id):
logging.error("catch exception,logins:%s" % traceback.format_exc()) logging.error("catch exception,logins:%s" % traceback.format_exc())
def get_data(num1,num2): def get_data(num1, num2):
try: try:
pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306) pc = pymysql.connect(host=host, user=user, passwd=passwd, db=db, port=3306)
cursor = pc.cursor() cursor = pc.cursor()
cursor.execute( cursor.execute(
"SELECT id,user_id FROM topic WHERE is_online =1 and (id > "+str(num1)+" and id <= "+str(num2)+") and (content_level = 4 or content_level = 5) and user_id in (select user_id from user_extra where is_shadow = 1)") "SELECT id,user_id FROM topic WHERE is_online =1 and (id > " + str(num1) + " and id <= " + str(
num2) + ") and (content_level = 4 or content_level = 5) ")
data = cursor.fetchall() data = cursor.fetchall()
user_id = list(data) topic_id = list(data)
logging.info("Database version : %s " % user_id)
topic_id_list = []
for i in topic_id[1]:
cursor.execute(
"SELECT user_id from user_extra where is_shadow = 1 and user_id = " + str(i) + "")
data = cursor.fetchall()
user_id = list(data)
logging.info("Database version : %s " % user_id)
if user_id:
topic_id_list.append(i)
logging.info("Database version : %s " % topic_id)
pc.close() pc.close()
return user_id return topic_id_list
except: except:
logging.error("catch exception,get_data:%s" % traceback.format_exc()) logging.error("catch exception,get_data:%s" % traceback.format_exc())
return None return None
...@@ -59,7 +70,7 @@ if __name__ == "__main__": ...@@ -59,7 +70,7 @@ if __name__ == "__main__":
try: try:
time_list = [[0, 10000],[10000,20000]] time_list = [[0, 100], [100, 200]]
# [10000, 20000], # [10000, 20000],
# [20000, 30000], # [20000, 30000],
# ["2017-03-30 15:57:49.000000", "2016-03-30 15:57:49.000000"], # ["2017-03-30 15:57:49.000000", "2016-03-30 15:57:49.000000"],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment