zhangguidong 2 år sedan
förälder
incheckning
447b17ae6b
1 ändrade filer med 6 tillägg och 3 borttagningar
  1. 6 3
      application/api/controller/Notification.php

+ 6 - 3
application/api/controller/Notification.php

@@ -85,7 +85,8 @@ class Notification extends Api
                 if($re) {
                     if ($user_info['sms_number'] > 0 && $user_info['duanxin'] == 1) {
                         $sms_model->order_guoshi($v['phone'], $v['order_no'], $v['order_money'], $v['t_user_id']);
-                        $user_model->isUpdate('true', ['id' => $v['t_user_id']])->save(['sms_number' => $user_info['sms_number']-1]);
+                        $num = $user_info['sms_number']-1;
+                        $user_model->isUpdate('true', ['id' => $v['t_user_id']])->save(['sms_number' =>$num ]);
 
                     }
                     if ($v['type'] == 1) {
@@ -135,7 +136,8 @@ class Notification extends Api
                     $sms_date = $date.$v['sta'].'00';
                     if ($user_info['sms_number'] > 0 && $user_info['duanxin'] == 1) {
                         $sms_model->order_sta($v['phone'], $sms_date, $v['t_user_id']);
-                        $user_model->isUpdate('true', ['id' => $v['t_user_id']])->save(['sms_number' => $user_info['sms_number' - 1]]);
+                        $num = $user_info['sms_number']-1;
+                        $user_model->isUpdate('true', ['id' => $v['t_user_id']])->save(['sms_number' =>$num ]);
                     }
                     $message_data = [
                         'category_id' => 2,
@@ -168,7 +170,8 @@ class Notification extends Api
                     $sms_date = $date.$v['end'].'00';
                     if ($user_info['sms_number'] > 0 && $user_info['duanxin'] == 1) {
                         $sms_model->order_end($v['phone'], $sms_date, $v['t_user_id']);
-                        $user_model->isUpdate('true', ['id' => $v['t_user_id']])->save(['sms_number' => $user_info['sms_number' - 1]]);
+                        $num = $user_info['sms_number']-1;
+                        $user_model->isUpdate('true', ['id' => $v['t_user_id']])->save(['sms_number' =>$num ]);
                     }
                     $message_data = [
                         'category_id' => 2,