作者 何书鹏

bug修改

... ... @@ -366,7 +366,7 @@ class Order extends Api
$model = new UserCoupon();
// 更新已过期状态
$model->where('status','0')->where('user_id',$this->auth->id)->update(['status'=>'2']);
$model->where('status','0')->where('user_id',$this->auth->id)->where('endtime','<',time())->update(['status'=>'2']);
$price = $this->request->post('price');
if (!is_numeric($price)) $this->error('订单价格不合法');
... ...
... ... @@ -206,7 +206,7 @@ class User extends Api
$model = new UserCoupon();
// 更新已过期状态
$model->where('status','0')->where('user_id',$this->auth->id)->update(['status'=>'2']);
$model->where('status','0')->where('user_id',$this->auth->id)->where('endtime','<',time())->update(['status'=>'2']);
$type = $this->request->post('type');
if (!in_array($type,[0,1,2])) $this->error('type参数不合法');
... ...