From a0f3d2374b5c0756dfcdc831c44f03b0cf9d1d24 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Mon, 5 Jun 2023 15:14:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E6=B7=BB=E5=8A=A0=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/model/store/product/Product.php | 2 -- app/controller/merchant/store/product/Product.php | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) 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('编辑成功'); }