Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
physical
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpha
physical
Commits
a7f0fa13
Commit
a7f0fa13
authored
6 years ago
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
b2b82d2e
master
deploy/like-prod
deploy/like-stage
deploy/like-test
dev
like-pre/r01
test
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
tasks.py
injection/data_sync/tasks.py
+9
-6
No files found.
injection/data_sync/tasks.py
View file @
a7f0fa13
...
...
@@ -130,12 +130,14 @@ def auto_click(pk_list):
if
len
(
pk_list
)
==
1
:
cursor
.
execute
(
"SELECT id FROM topic WHERE id = "
+
str
(
pk_list
[
0
])
+
" and user_id in (select user_id from user_extra where is_shadow = 1)"
)
pk_list
[
0
])
+
" and user_id in (select user_id from user_extra where is_shadow = 0) and create_time LIKE '
%%%%%
s
%%%%
'"
%
yes_time_str
)
else
:
cursor
.
execute
(
"SELECT id FROM topic WHERE id in "
+
str
(
# and create_time LIKE '%%%%%s%%%%'% yes_time_str
tuple
(
pk_list
))
+
" and user_id in (select user_id from user_extra where is_shadow = 1)"
)
"SELECT id FROM topic WHERE id in "
+
str
(
tuple
(
pk_list
))
+
" and user_id in (select user_id from user_extra where is_shadow = 0 ) and create_time LIKE '
%%%%%
s
%%%%
'"
%
yes_time_str
)
data
=
cursor
.
fetchall
()
topic_id_list
=
list
(
data
)
logging
.
info
(
"Database version :
%
s "
%
topic_id_list
)
...
...
@@ -193,13 +195,14 @@ def auto_reply(pk_list):
if
len
(
pk_list
)
>
0
:
if
len
(
pk_list
)
==
1
:
cursor
.
execute
(
"SELECT id FROM topic WHERE id = "
+
str
(
tuple
(
# and create_time LIKE '%%%%%s%%%%'
pk_list
))
+
" and user_id in (select user_id from user_extra where is_shadow = 0) "
)
"SELECT id FROM topic WHERE id = "
+
str
(
#
pk_list
[
0
])
+
" and user_id in (select user_id from user_extra where is_shadow = 0) and create_time LIKE '
%%%%%
s
%%%%
' "
%
yes_time_str
)
else
:
cursor
.
execute
(
"SELECT id FROM topic WHERE id in "
+
str
(
tuple
(
# and create_time LIKE '%%%%%s%%%%'
pk_list
))
+
" and user_id in (select user_id from user_extra where is_shadow = 0)
"
)
pk_list
))
+
" and user_id in (select user_id from user_extra where is_shadow = 0)
and and create_time LIKE '
%%%%%
s
%%%%
'"
%
yes_time_str
)
data
=
cursor
.
fetchall
()
topic_id_list
=
list
(
data
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment