Commit 2009b8c1 authored by lixiaofang's avatar lixiaofang

修改马甲号

parent 794f6dd2
...@@ -5,6 +5,7 @@ import logging ...@@ -5,6 +5,7 @@ import logging
from libs.cache import redis_client from libs.cache import redis_client
import json import json
from moment.views.send_email import send_email_tome from moment.views.send_email import send_email_tome
from moment.views.process_time import get_vest_userid
import datetime import datetime
...@@ -47,12 +48,12 @@ def click(card_info): ...@@ -47,12 +48,12 @@ def click(card_info):
redis_client.hset(key, str_today, json.dumps(redis_data)) redis_client.hset(key, str_today, json.dumps(redis_data))
rpc_invoker = get_rpc_invoker() rpc_invoker = get_rpc_invoker()
try: 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() 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) error = status.get('error', 1)
if error == 0: if error == 0:
return True return True
......
...@@ -6,7 +6,7 @@ from libs.cache import redis_client ...@@ -6,7 +6,7 @@ from libs.cache import redis_client
import json import json
from moment.views.send_email import send_email_tome from moment.views.send_email import send_email_tome
import datetime 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): def comment(card_info):
...@@ -144,10 +144,13 @@ def comment(card_info): ...@@ -144,10 +144,13 @@ def comment(card_info):
rpc_invoker = get_rpc_invoker() rpc_invoker = get_rpc_invoker()
try: 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'], answer_id=card_info['card_id'],
content=card_info[ content=card_info[
'comment_content']).unwrap() 'comment_content']).unwrap()
logging.info('get_create_answer_reply_status:%s,card_id:%s' % (status, card_info['card_id']))
error = status.get('error', 1) error = status.get('error', 1)
if error == 0: if error == 0:
return True return True
......
...@@ -5,6 +5,7 @@ import logging ...@@ -5,6 +5,7 @@ import logging
from libs.cache import redis_client from libs.cache import redis_client
import json import json
from moment.views.send_email import send_email_tome from moment.views.send_email import send_email_tome
from moment.views.process_time import get_vest_userid
import datetime import datetime
...@@ -49,9 +50,11 @@ def follow(card_info): ...@@ -49,9 +50,11 @@ def follow(card_info):
rpc_invoker = get_rpc_invoker() rpc_invoker = get_rpc_invoker()
try: 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[ followed_user_id=card_info[
'card_user_id']).unwrap() '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) error = status.get('error', 1)
if error == 0: 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