diff --git a/app/common/model/store/product/Product.php b/app/common/model/store/product/Product.php index 1462a635..21e9b6e4 100644 --- a/app/common/model/store/product/Product.php +++ b/app/common/model/store/product/Product.php @@ -37,8 +37,6 @@ class Product extends BaseModel protected $deleteTime = 'is_del'; protected $defaultSoftDelete = 0; - protected $updateTime = true; - const IS_SHOW = 1; //上架 const IS_NOT_SHOW = 0; //下架 diff --git a/app/controller/merchant/store/product/Product.php b/app/controller/merchant/store/product/Product.php index 789bd641..f138af54 100644 --- a/app/controller/merchant/store/product/Product.php +++ b/app/controller/merchant/store/product/Product.php @@ -90,6 +90,7 @@ class Product extends BaseController }else{ $product_type=0;//普通商品 } + $data['update_time'] = date('Y-m-d H:i:s'); $this->repository->create($data,$product_type); return app('json')->success('添加成功'); } @@ -115,6 +116,7 @@ class Product extends BaseController } $data['mer_status'] = ($this->request->merchant()->is_del || !$this->request->merchant()->mer_state || !$this->request->merchant()->status) ? 0 : 1; $data['mer_id'] = $this->request->merId(); + $data['update_time'] = date('Y-m-d H:i:s'); $this->repository->edit($id, $data, $this->request->merId(), 0); return app('json')->success('编辑成功'); }