|
@@ -124,7 +124,8 @@ class UserExtract extends BaseModel
|
|
|
$data = self::get($id);
|
|
|
$extractNumber = $data['extract_price'];
|
|
|
$mark = '成功提现佣金' . $extractNumber . '元';
|
|
|
- $wechatUserInfo = WechatUser::where('uid', $data['uid'])->field('openid,user_type,routine_openid,nickname')->find();
|
|
|
+ $user = User::where('uid', $data['uid'])->find();
|
|
|
+ $wechatUserInfo = WechatUser::where('uid', $data['uid'])->lock(true)->field('openid,user_type,routine_openid,nickname')->find();
|
|
|
$extract_type = '未知方式';
|
|
|
switch ($data['extract_type']) {
|
|
|
case 'alipay':
|
|
@@ -140,8 +141,8 @@ class UserExtract extends BaseModel
|
|
|
|
|
|
if ($wechatUserInfo) {
|
|
|
if (strtolower($wechatUserInfo->user_type) == 'routine') {
|
|
|
- $res = self::tixian('佣金提现', time().rand(1000,9999), $extractNumber, $wechatUserInfo['routine_openid']);
|
|
|
- if ($res['code'] == 'NO_AUTH') return false;
|
|
|
+ $res = self::tixian('用户id'.$user['uid'].'手机号:'.$user['phone'].'-佣金提现', time().rand(1000,9999), $extractNumber, $wechatUserInfo['routine_openid']);
|
|
|
+ if (isset($res['code'])) return false;
|
|
|
if (!isset($res['out_batch_no'])) return false;
|
|
|
RoutineTemplate::sendExtractSuccess($data['uid'], $extractNumber, $wechatUserInfo->nickname);
|
|
|
} else if (strtolower($wechatUserInfo->user_type) == 'wechat') {
|