|
|
@@ -107,6 +107,12 @@ class UserController
|
|
|
->where('goods_type', 7)
|
|
|
->exists();
|
|
|
|
|
|
+ $is_buy_qianshuxieyi = Db::table('wa_payorder')
|
|
|
+ ->where('user_id', $request->user_data['id'])
|
|
|
+ ->where('is_pay', 2)
|
|
|
+ ->where('goods_type', 8)
|
|
|
+ ->exists();
|
|
|
+
|
|
|
$arr = [
|
|
|
'img' => !empty($request->user_data['img']) ? imageToBase64($request->user_data['img']) : '',
|
|
|
'uuid' => $request->user_data['uuid'],
|
|
|
@@ -225,6 +231,21 @@ class UserController
|
|
|
StreamBusiness::addStream($request->user_data['id'], 3000, streamType46, moldType16, moldTypefild16);
|
|
|
}
|
|
|
|
|
|
+ if($is_buy_qianshuxieyi){
|
|
|
+ $datawithdraw = Db::table('wa_withdraw')
|
|
|
+ ->whereIn('type', [17, 10])
|
|
|
+ ->where('user_id', $request->user_data['id'])
|
|
|
+ ->where('status', 1)
|
|
|
+ ->orderByDesc('id')
|
|
|
+ ->get()->toArray();
|
|
|
+ foreach ($datawithdraw as $k => $v) {
|
|
|
+ Db::table('wa_withdraw')->where('id', $v->id)->update(['status' => 3, 'updated_at' => date('Y-m-d H:i:s')]);
|
|
|
+ Db::table('wa_withdraw')->where('id', $v->id)->update(['status' => 3, 'updated_at' => date('Y-m-d H:i:s')]);
|
|
|
+ StreamBusiness::addStream($v->user_id, $v->money, streamType4, moldType3, moldTypefild3, $v->id);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
return success($arr);
|
|
|
}
|