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
debbbf0c
Commit
debbbf0c
authored
Jan 15, 2020
by
李小芳
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'change_vest_id' into 'master'
修改马甲号 See merge request
!31
parents
794f6dd2
2009b8c1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
click_fun.py
click/views/click_fun.py
+4
-3
comment_fun.py
comment/views/comment_fun.py
+5
-2
follow_fun.py
follow/views/follow_fun.py
+4
-1
No files found.
click/views/click_fun.py
View file @
debbbf0c
...
...
@@ -5,6 +5,7 @@ import logging
from
libs.cache
import
redis_client
import
json
from
moment.views.send_email
import
send_email_tome
from
moment.views.process_time
import
get_vest_userid
import
datetime
...
...
@@ -47,12 +48,12 @@ def click(card_info):
redis_client
.
hset
(
key
,
str_today
,
json
.
dumps
(
redis_data
))
rpc_invoker
=
get_rpc_invoker
()
try
:
status
=
rpc_invoker
[
'qa/irrigation/create_answer_vote'
](
user_id
=
card_info
[
'current_user_id'
],
current_user_id
=
get_vest_userid
(
need_comment_num
=
1
)[
0
]
status
=
rpc_invoker
[
'qa/irrigation/create_answer_vote'
](
user_id
=
current_user_id
,
answer_id
=
card_info
[
'card_id'
])
.
unwrap
()
logging
.
info
(
'get_create_answer_vote_status:
%
s,card_id:
%
s'
%
(
status
,
card_info
[
'card_id'
]))
error
=
status
.
get
(
'error'
,
1
)
if
error
==
0
:
return
True
...
...
comment/views/comment_fun.py
View file @
debbbf0c
...
...
@@ -6,7 +6,7 @@ from libs.cache import redis_client
import
json
from
moment.views.send_email
import
send_email_tome
import
datetime
from
moment.views.process_time
import
get_vest_userid_and_comment
from
moment.views.process_time
import
get_vest_userid_and_comment
,
get_vest_userid
def
comment
(
card_info
):
...
...
@@ -144,10 +144,13 @@ def comment(card_info):
rpc_invoker
=
get_rpc_invoker
()
try
:
status
=
rpc_invoker
[
'qa/irrigation/create_answer_reply'
](
user_id
=
card_info
[
'current_user_id'
],
current_user_id
=
get_vest_userid
(
need_comment_num
=
1
)[
0
]
status
=
rpc_invoker
[
'qa/irrigation/create_answer_reply'
](
user_id
=
current_user_id
,
answer_id
=
card_info
[
'card_id'
],
content
=
card_info
[
'comment_content'
])
.
unwrap
()
logging
.
info
(
'get_create_answer_reply_status:
%
s,card_id:
%
s'
%
(
status
,
card_info
[
'card_id'
]))
error
=
status
.
get
(
'error'
,
1
)
if
error
==
0
:
return
True
...
...
follow/views/follow_fun.py
View file @
debbbf0c
...
...
@@ -5,6 +5,7 @@ import logging
from
libs.cache
import
redis_client
import
json
from
moment.views.send_email
import
send_email_tome
from
moment.views.process_time
import
get_vest_userid
import
datetime
...
...
@@ -49,9 +50,11 @@ def follow(card_info):
rpc_invoker
=
get_rpc_invoker
()
try
:
status
=
rpc_invoker
[
'api/irrigation/user_add_follow'
](
follow_user_id
=
card_info
[
'current_user_id'
],
current_user_id
=
get_vest_userid
(
need_comment_num
=
1
)[
0
]
status
=
rpc_invoker
[
'api/irrigation/user_add_follow'
](
follow_user_id
=
current_user_id
,
followed_user_id
=
card_info
[
'card_user_id'
])
.
unwrap
()
logging
.
info
(
'get_user_add_follow_status:
%
s,card_id:
%
s'
%
(
status
,
card_info
[
'card_id'
]))
error
=
status
.
get
(
'error'
,
1
)
if
error
==
0
:
...
...
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