|
@@ -211,6 +211,27 @@ class WechatPay extends Api{
|
|
foreach ($orderList as $key => $value) {
|
|
foreach ($orderList as $key => $value) {
|
|
if( $value['order_score'] > 0 ) $CustomScore->trade($orderInfo['custom_uid'],$value['id'],$value['order_score'],5,1);
|
|
if( $value['order_score'] > 0 ) $CustomScore->trade($orderInfo['custom_uid'],$value['id'],$value['order_score'],5,1);
|
|
}
|
|
}
|
|
|
|
+ }else{
|
|
|
|
+ if ($regimentInfo['status'] === 4) {
|
|
|
|
+ $res = regiment::query()->where('id','=',$regimentId)->update(['status'=>0]);
|
|
|
|
+ Log::log('notify_wechat_pay', '图满 团状态,regiment_id:'.$regimentId.';'. json_encode($res));
|
|
|
|
+ if( !$res ) {
|
|
|
|
+ Log::log('notify_wechat_pay', '更新团订单失败1' . json_encode($regimentInfo));
|
|
|
|
+ // 回退数据
|
|
|
|
+ //DB::rollBack();
|
|
|
|
+ DB::connection('company')->rollBack();
|
|
|
|
+ return json_send(['code'=>'FAIL']);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //修改团记录状态
|
|
|
|
+ $res = RegimentRecord::query()->where('order_id','=',$orderInfo['id'])->update(['status'=>0]);
|
|
|
|
+ if( !$res ) {
|
|
|
|
+ Log::log('notify_wechat_pay', '更新团记录状态失败' . json_encode($regimentInfo));
|
|
|
|
+ // 回退数据
|
|
|
|
+ //DB::rollBack();
|
|
|
|
+ DB::connection('company')->rollBack();
|
|
|
|
+ return json_send(['code'=>'FAIL']);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// 提交数据
|
|
// 提交数据
|