|
@@ -3,6 +3,7 @@
|
|
|
namespace app\admin\controller\sys_manage;
|
|
|
|
|
|
use app\model\Order;
|
|
|
+use support\Log;
|
|
|
use support\Request;
|
|
|
|
|
|
class BellsController
|
|
@@ -31,15 +32,20 @@ class BellsController
|
|
|
return json_fail("参数异常");
|
|
|
}
|
|
|
|
|
|
- $order = Order::where('order_id', $orderId)->first();
|
|
|
- if (!empty($order->order_config_json)) {
|
|
|
- $orderConfigJson = json_decode($order->order_config_json, true);
|
|
|
- unset($orderConfigJson['bell']);
|
|
|
+ Log::info("订单提醒操作",$request->post());
|
|
|
|
|
|
- $order->order_config_json = json_encode($orderConfigJson);
|
|
|
- $order->save();
|
|
|
- }
|
|
|
+ try {
|
|
|
+ $order = Order::where('order_id', $orderId)->first();
|
|
|
+ if (!empty($order->order_config_json)) {
|
|
|
+ $orderConfigJson = json_decode($order->order_config_json, true);
|
|
|
+ unset($orderConfigJson['bell']);
|
|
|
|
|
|
- return json_success('success');
|
|
|
+ $order->order_config_json = json_encode($orderConfigJson);
|
|
|
+ $order->save();
|
|
|
+ }
|
|
|
+ return json_success('success');
|
|
|
+ }catch (\Exception $e){
|
|
|
+ return json_fail('操作失败');
|
|
|
+ }
|
|
|
}
|
|
|
}
|