WIN-2308041133\Administrator hai 1 día
pai
achega
6a1372720e
Modificáronse 2 ficheiros con 29 adicións e 32 borrados
  1. 1 9
      app/api/controller/Pub.php
  2. 28 23
      app/model/api/RechargeOrder.php

+ 1 - 9
app/api/controller/Pub.php

@@ -248,18 +248,10 @@ class Pub extends BaseController
     public function getWorkerList(Request $request)
     public function getWorkerList(Request $request)
     {
     {
         $post = UtilService::getMore([
         $post = UtilService::getMore([
-//            ['page', 1],
-//            ['pageSize', 50],
-//            ['work_type_id', ""],
-//            ['service_area', []],
             ['page', 1],
             ['page', 1],
             ['pageSize', 50],
             ['pageSize', 50],
             ['work_type_id', ""],
             ['work_type_id', ""],
-            ['servicePrice', 0],
-            ['areaId', ''],
-            ['is_china', ''],
-            ['service_area', []],
-            ['timetype', '']
+
         ], $request);
         ], $request);
         $post["pageSize"] = $post["pageSize"] > 50 ? 50 : (int)$post["pageSize"];
         $post["pageSize"] = $post["pageSize"] > 50 ? 50 : (int)$post["pageSize"];
         $post["page"] = $post["page"] <= 0 ? 1 : (int)$post["page"];
         $post["page"] = $post["page"] <= 0 ? 1 : (int)$post["page"];

+ 28 - 23
app/model/api/RechargeOrder.php

@@ -37,29 +37,34 @@ class RechargeOrder extends BaseModel
      */
      */
     public function createOrder($uid, $rechargeId, $price, $integral, $giveIntegral, $payType = 'wxpay', $adminId = 0, $remark = '', $discount = 0)
     public function createOrder($uid, $rechargeId, $price, $integral, $giveIntegral, $payType = 'wxpay', $adminId = 0, $remark = '', $discount = 0)
     {
     {
-        $orderSn = $this->mkOrderSn($uid);
-        $totalIntegral = $integral + $giveIntegral;
-        
-        $bool = $this->insert([
-            'order_id' => $orderSn,
-            'uid' => $uid,
-            'recharge_id' => $rechargeId,
-            'price' => $price,
-            'integral' => $integral,
-            'give_integral' => $giveIntegral,
-            'total_integral' => $totalIntegral,
-            'pay_type' => $payType,
-            'paid' => 0,
-            'pay_time' => 0,
-            'remark' => $remark,
-            'admin_id' => $adminId,
-            'discount_amount' => $discount,
-            'status' => 0,
-            'add_time' => time(),
-            'update_time' => time()
-        ]);
-        
-        return $bool ? $orderSn : null;
+        try {
+            $orderSn = $this->mkOrderSn($uid);
+            $totalIntegral = $integral + $giveIntegral;
+
+            $bool = $this->insert([
+                'order_id' => $orderSn,
+                'uid' => $uid,
+                'recharge_id' => $rechargeId,
+                'price' => $price,
+                'integral' => $integral,
+                'give_integral' => $giveIntegral,
+                'total_integral' => $totalIntegral,
+                'pay_type' => $payType,
+                'paid' => 0,
+                'pay_time' => 0,
+                'remark' => $remark,
+                'admin_id' => $adminId,
+                'discount_amount' => $discount,
+                'status' => 0,
+                'add_time' => time(),
+                'update_time' => time()
+            ]);
+
+            return $bool ? $orderSn : null;
+        } catch (\Exception $e) {
+            @file_put_contents('quanju.txt', date('Y-m-d H:i:s') . ' [createOrder Error] ' . $e->getMessage() . ' File: ' . $e->getFile() . ' Line: ' . $e->getLine() . "创建订单报错\r\n", 8);
+            return null;
+        }
     }
     }
 
 
     /**
     /**