Commit debbbf0c authored by 李小芳's avatar 李小芳

Merge branch 'change_vest_id' into 'master'

修改马甲号

See merge request !31
parents 794f6dd2 2009b8c1
......@@ -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
......
......@@ -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
......
......@@ -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:
......
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