Преглед на файлове

后台-订单-新增撤回功能

xupuyuan преди 10 месеца
родител
ревизия
6e417b0a1a
променени са 1 файла, в които са добавени 1 реда и са изтрити 3 реда
  1. 1 3
      app/controller/admin/order/Order.php

+ 1 - 3
app/controller/admin/order/Order.php

@@ -356,8 +356,6 @@ class Order extends BaseController
356
  //           取出购买赠送积分 / 支出积分
356
  //           取出购买赠送积分 / 支出积分
357
                 $score = $this->getValue('user_sign_score', ['order_id' => $order_id, 'status' => 1,'source_type' => 3,'uid' => $uid,'pm' => 1], 'reward_score');
357
                 $score = $this->getValue('user_sign_score', ['order_id' => $order_id, 'status' => 1,'source_type' => 3,'uid' => $uid,'pm' => 1], 'reward_score');
358
                 $payScore = $this->getValue('user_sign_score', ['order_id' => $order_id, 'status' => 1,'pm' => 2,'uid' => $uid,], 'reward_score');
358
                 $payScore = $this->getValue('user_sign_score', ['order_id' => $order_id, 'status' => 1,'pm' => 2,'uid' => $uid,], 'reward_score');
359
-            Db::name('user')->where('uid', $uid)->inc('score', $payScore)->update();
360
-                       Db::name('user')->where('uid', $uid)->dec('score', $score)->update();
361
 //            // 取出推广赠送的积分和推广人的 uid
359
 //            // 取出推广赠送的积分和推广人的 uid
362
 // //           $spreadScore = $this->getValue('user_sign_score', [
360
 // //           $spreadScore = $this->getValue('user_sign_score', [
363
 //                ['order_id', '=', $order_id],
361
 //                ['order_id', '=', $order_id],
@@ -423,7 +421,7 @@ class Order extends BaseController
423
             Db::commit();
421
             Db::commit();
424
         } catch (\Exception $e) {
422
         } catch (\Exception $e) {
425
             Db::rollback();
423
             Db::rollback();
426
-            return app('json')->fail('操作失败');
424
+            return app('json')->fail('操作失败'. $e->getMessage());
427
         }
425
         }
428
         return app('json')->success('操作成功');
426
         return app('json')->success('操作成功');
429
     }
427
     }