소스 검색

订单字段数据补充

xialei 1 년 전
부모
커밋
a737344333
2개의 변경된 파일18개의 추가작업 그리고 2개의 파일을 삭제
  1. 16 1
      app/controller/api/Notify.php
  2. 2 1
      route/api.php

+ 16 - 1
app/controller/api/Notify.php

@@ -1445,7 +1445,22 @@ class Notify
1445
 
1445
 
1446
 
1446
 
1447
 
1447
 
1448
-
1448
+    //订单数据补充
1449
+    public function buchong(){
1450
+        $list = Db::name('store_order')->where('fzone_paytype', 'not null')->select();
1451
+        foreach($list as $k => $v){
1452
+            $fzone_paytype = json_decode($v['fzone_paytype'], true);
1453
+            if(isset($fzone_paytype['jingdou'])) $update_data['fzone_pay_jingdou'] = $fzone_paytype['jingdou'];
1454
+            if(isset($fzone_paytype['vr'])) $update_data['fzone_pay_vr'] = $fzone_paytype['vr'];
1455
+            if(isset($fzone_paytype['jifen'])) $update_data['fzone_pay_jifen'] = $fzone_paytype['jifen'];
1456
+            if(isset($fzone_paytype['price'])) $update_data['fzone_pay_price'] = $fzone_paytype['price'];
1457
+            if(isset($fzone_paytype['other'])) $update_data['fzone_pay_other'] = $fzone_paytype['other'];
1458
+            if(isset($fzone_paytype['type'])) $update_data['fzone_pay_type'] = $fzone_paytype['type'];
1459
+            if(isset($fzone_paytype['note'])) $update_data['fzone_pay_note'] = $fzone_paytype['note'];
1460
+            Db::name('store_order')->where("order_id", $v['order_id'])->update($update_data);
1461
+        }
1462
+        return app('json')->success(['result' => 'ok']);
1463
+    }
1449
 
1464
 
1450
 
1465
 
1451
 
1466
 

+ 2 - 1
route/api.php

@@ -1051,7 +1051,8 @@ Route::group('api/', function () {
1051
     //话费充值回调通知
1051
     //话费充值回调通知
1052
     Route::post('huafei/notify', 'api.store.service.Huafei/notify');
1052
     Route::post('huafei/notify', 'api.store.service.Huafei/notify');
1053
 
1053
 
1054
-
1054
+    //订单数据补充
1055
+    Route::post('order/buchong', 'api.notify/buchong');
1055
 
1056
 
1056
     //城市代码
1057
     //城市代码
1057
     Route::get('su/city', 'api.store.product.Su/cityCode');
1058
     Route::get('su/city', 'api.store.product.Su/cityCode');