|
|
@@ -71,7 +71,7 @@ class GzcLogs extends BaseController
|
|
71
|
71
|
* created: 2021/3/24 13:56
|
|
72
|
72
|
*/
|
|
73
|
73
|
public function inGzc()
|
|
74
|
|
- {
|
|
|
74
|
+ {
|
|
75
|
75
|
$id = intval($this->request->param('id'));
|
|
76
|
76
|
$log = Db::table('rrx_gzc_logs')
|
|
77
|
77
|
->where('id', $id)
|
|
|
@@ -79,11 +79,11 @@ class GzcLogs extends BaseController
|
|
79
|
79
|
->where('success', 0)
|
|
80
|
80
|
->where('pension', '>', 0)
|
|
81
|
81
|
->find();
|
|
82
|
|
-
|
|
|
82
|
+
|
|
83
|
83
|
if(!$log){
|
|
84
|
|
- return app('json')->fail('请选择未入账的记录', );
|
|
|
84
|
+ return app('json')->fail('请选择未入账的记录');
|
|
85
|
85
|
}
|
|
86
|
|
-
|
|
|
86
|
+
|
|
87
|
87
|
$mobile= $log['mobile'];
|
|
88
|
88
|
$user_name = Db::name('user_certification')->where('uid',$log['uid'])->value('user_name');
|
|
89
|
89
|
$user_card = Db::name('user_certification')->where('uid',$log['uid'])->value('user_card');
|
|
|
@@ -116,18 +116,18 @@ class GzcLogs extends BaseController
|
|
116
|
116
|
$OrderMerchantRepository = app()->make(OrderMerchantRepository::class);
|
|
117
|
117
|
$orderId = $OrderMerchantRepository->getNewOrderId('IN10');
|
|
118
|
118
|
Db::table('rrx_gzc_logs')
|
|
119
|
|
- ->where('id', $id)
|
|
120
|
|
- ->where('gzc', 0)
|
|
121
|
|
- ->where('success', 0)
|
|
122
|
|
- ->where('pension', '>', 0)
|
|
123
|
|
- ->update([
|
|
124
|
|
- 'gzc' => 1,
|
|
125
|
|
- 'platform_no' => $orderId,
|
|
126
|
|
- 'gzc_deposit_no' => $gzc_deposit_no,
|
|
127
|
|
- 'gzc_confirm_result' => $gzc_confirm_result,
|
|
128
|
|
- 'success' => 1,
|
|
129
|
|
- 'update_time' => date('Y-m-d H:i:s')
|
|
130
|
|
- ]);
|
|
|
119
|
+ ->where('id', $id)
|
|
|
120
|
+ ->where('gzc', 0)
|
|
|
121
|
+ ->where('success', 0)
|
|
|
122
|
+ ->where('pension', '>', 0)
|
|
|
123
|
+ ->update([
|
|
|
124
|
+ 'gzc' => 1,
|
|
|
125
|
+ 'platform_no' => $orderId,
|
|
|
126
|
+ 'gzc_deposit_no' => $gzc_deposit_no,
|
|
|
127
|
+ 'gzc_confirm_result' => $gzc_confirm_result,
|
|
|
128
|
+ 'success' => 1,
|
|
|
129
|
+ 'update_time' => date('Y-m-d H:i:s')
|
|
|
130
|
+ ]);
|
|
131
|
131
|
|
|
132
|
132
|
//发起成功更新记录值
|
|
133
|
133
|
$order_id = Db::name('store_order')->where('order_sn', $log['out_trade_no'])->value('order_id');
|
|
|
@@ -135,13 +135,13 @@ class GzcLogs extends BaseController
|
|
135
|
135
|
$bill = Db::name('user_bill')->where('link_id', $order_id)->where('commission_type', 5)->where('is_gzc', 'in', [0, 1])->find();
|
|
136
|
136
|
if($bill){
|
|
137
|
137
|
Db::name('user_bill')
|
|
138
|
|
- ->where('bill_id', $bill['bill_id'])
|
|
139
|
|
- ->update([
|
|
140
|
|
- 'is_gzc' => 2
|
|
141
|
|
- ]);
|
|
|
138
|
+ ->where('bill_id', $bill['bill_id'])
|
|
|
139
|
+ ->update([
|
|
|
140
|
+ 'is_gzc' => 2
|
|
|
141
|
+ ]);
|
|
142
|
142
|
}
|
|
143
|
143
|
}
|
|
144
|
|
-
|
|
|
144
|
+
|
|
145
|
145
|
return app('json')->success('发起成功', $log);
|
|
146
|
146
|
}
|
|
147
|
147
|
|
|
|
@@ -195,7 +195,6 @@ class GzcLogs extends BaseController
|
|
195
|
195
|
DateTime::createFromFormat('Ymd', strval($birthday))
|
|
196
|
196
|
)->y;
|
|
197
|
197
|
$certification = $OrderGzcRepository->certification($uid, $mobile, $user_name, $user_card, $card_positive, $card_reverse,$cardType,$birthday,$gender,$age);
|
|
198
|
|
- Log::info('pcpc认证结果' . json_encode($certification));
|
|
199
|
198
|
if($certification['status'] != 200) return app('json')->fail('实名认证失败:'.$certification['message']);
|
|
200
|
199
|
$gzc = $OrderGzcRepository->gzc($uid,$log['pension']);
|
|
201
|
200
|
if($gzc['status'] != 200) return app('json')->fail('入账失败:'.$gzc['message']);
|