fix: 自动提现按俱乐部解析微信openid,修复已登录仍提示微信登录
This commit is contained in:
@@ -201,13 +201,14 @@ def process_audit_collect(request):
|
||||
)
|
||||
|
||||
try:
|
||||
if not user_main.OpenID:
|
||||
return Response({'code': 10, 'msg': '用户未绑定微信,无法收款'})
|
||||
|
||||
from users.tixian_shenhe_services import get_auto_withdraw_openid
|
||||
from jituan.services.club_user import get_user_club_id
|
||||
from jituan.services.wechat_pay import get_wechat_v3_config
|
||||
|
||||
payout_club_id = get_user_club_id(user_main)
|
||||
payout_openid = get_auto_withdraw_openid(user_main)
|
||||
if not payout_openid:
|
||||
return Response({'code': 10, 'msg': '用户未绑定微信,无法收款'})
|
||||
wx_cfg = get_wechat_v3_config(payout_club_id)
|
||||
if not wx_cfg.get('APPID') or not wx_cfg.get('MCHID') or not wx_cfg.get('TRANSFER_SCENE_ID'):
|
||||
logger.error('微信打款配置不完整 club=%s APPID=%s MCHID=%s', payout_club_id, wx_cfg.get('APPID'), wx_cfg.get('MCHID'))
|
||||
@@ -317,7 +318,7 @@ def process_audit_collect(request):
|
||||
audit.save(update_fields=['tixian_auto_id', 'UpdateTime'])
|
||||
|
||||
body = _build_wx_transfer_body(
|
||||
wx_cfg, tixian_id, user_main.OpenID, yonghuid, leixing, shijidaozhang,
|
||||
wx_cfg, tixian_id, payout_openid, yonghuid, leixing, shijidaozhang,
|
||||
)
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user