Explorar el Código

wesmiler 抢表商城

APPLE hace 3 años
padre
commit
a315d98f4e
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      app/Services/Common/TradeService.php

+ 2 - 1
app/Services/Common/TradeService.php

@@ -91,6 +91,7 @@ class TradeService extends BaseService
             ->leftJoin('goods as g', 'g.id', '=', 'a.goods_id')
             ->leftJoin('shop as s', 's.id', '=', 'g.shop_id')
             ->where($where)
+            ->where('a.status','>', 0)
             ->where(function ($query) use ($params) {
                 $keyword = isset($params['keyword']) ? $params['keyword'] : '';
                 if ($keyword) {
@@ -842,7 +843,7 @@ class TradeService extends BaseService
             return false;
         }
 
-        if($this->model->where(['id'=> $id])->update(['status'=> -1,'update_time'=> time()])){
+        if($this->model->where(['id'=> $id])->update(['status'=> 5,'update_time'=> time()])){
             $this->error = 2088;
             return true;
         }else{