Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
V
vest
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
2
Merge Requests
2
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
rank
vest
Commits
dcf40748
Commit
dcf40748
authored
Jan 06, 2020
by
lixiaofang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
暂时去掉需要判断offset的接口
parent
23735430
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
12 deletions
+18
-12
click_fun.py
click/views/click_fun.py
+8
-4
comment_fun.py
comment/views/comment_fun.py
+3
-3
follow_fun.py
follow/views/follow_fun.py
+7
-5
No files found.
click/views/click_fun.py
View file @
dcf40748
...
...
@@ -32,12 +32,16 @@ def click(card_info):
if
click_num
>
10
:
logging
.
info
(
"今天已经消费到最大次数了,不能再消费"
)
# send_email_tome(str(redis_data) + str(card_info))
else
:
rpc_invoker
=
get_rpc_invoker
()
status
=
rpc_invoker
[
'qa/irrigation/create_answer_vote'
](
user_id
=
card_info
[
'current_user_id'
],
answer_id
=
card_info
[
'card_id'
])
.
unwrap
()
return
True
try
:
rpc_invoker
[
'qa/irrigation/create_answer_vote'
](
user_id
=
card_info
[
'current_user_id'
],
answer_id
=
card_info
[
'card_id'
])
.
unwrap
()
return
True
except
:
logging_exception
()
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
False
except
:
logging_exception
()
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
...
...
comment/views/comment_fun.py
View file @
dcf40748
...
...
@@ -38,7 +38,7 @@ def comment(card_info):
####在这里做判断 一天不能超过12个 如果超过二十个不下发 不超过二十个下发对应的灌水功能
if
comment_num
>
12
:
return
True
logging
.
info
(
"今天已经消费到最大次数了,不能再消费"
)
else
:
try
:
rpc_invoker
=
get_rpc_invoker
()
...
...
@@ -71,7 +71,7 @@ def comment(card_info):
####在这里做判断 一天不能超过12个 如果超过十二个不下发 不超过 十二个下发对应的灌水功能
if
comment_num
>
12
:
return
True
logging
.
info
(
"今天已经消费到最大次数了,不能再消费"
)
else
:
try
:
rpc_invoker
=
get_rpc_invoker
()
...
...
@@ -108,7 +108,7 @@ def comment(card_info):
####在这里做判断 一天不能超过12个 如果超过二十个不下发 不超过二十个下发对应的灌水功能
if
comment_num
>
12
:
return
True
logging
.
info
(
"今天已经消费到最大次数了,不能再消费"
)
else
:
rpc_invoker
=
get_rpc_invoker
()
try
:
...
...
follow/views/follow_fun.py
View file @
dcf40748
...
...
@@ -29,13 +29,15 @@ def follow(card_info):
if
follow_num
>
10
:
logging
.
info
(
"今天已经消费到最大次数了,不能再消费"
)
# send_email_tome(str(redis_data) + str(card_info))
else
:
rpc_invoker
=
get_rpc_invoker
()
status
=
rpc_invoker
[
'api/irrigation/user_add_follow'
](
follow_user_id
=
card_info
[
'current_user_id'
],
followed_user_id
=
card_info
[
'card_user_id'
])
.
unwrap
()
return
True
try
:
rpc_invoker
[
'api/irrigation/user_add_follow'
](
follow_user_id
=
card_info
[
'current_user_id'
],
followed_user_id
=
card_info
[
'card_user_id'
])
.
unwrap
()
return
True
except
:
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
return
False
except
:
logging_exception
()
logging
.
error
(
"catch exception,err_msg:
%
s"
%
traceback
.
format_exc
())
...
...
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