商品添加更新时间
This commit is contained in:
parent
ff623034c2
commit
a0f3d2374b
@ -37,8 +37,6 @@ class Product extends BaseModel
|
|||||||
|
|
||||||
protected $deleteTime = 'is_del';
|
protected $deleteTime = 'is_del';
|
||||||
protected $defaultSoftDelete = 0;
|
protected $defaultSoftDelete = 0;
|
||||||
protected $updateTime = true;
|
|
||||||
|
|
||||||
|
|
||||||
const IS_SHOW = 1; //上架
|
const IS_SHOW = 1; //上架
|
||||||
const IS_NOT_SHOW = 0; //下架
|
const IS_NOT_SHOW = 0; //下架
|
||||||
|
@ -90,6 +90,7 @@ class Product extends BaseController
|
|||||||
}else{
|
}else{
|
||||||
$product_type=0;//普通商品
|
$product_type=0;//普通商品
|
||||||
}
|
}
|
||||||
|
$data['update_time'] = date('Y-m-d H:i:s');
|
||||||
$this->repository->create($data,$product_type);
|
$this->repository->create($data,$product_type);
|
||||||
return app('json')->success('添加成功');
|
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_status'] = ($this->request->merchant()->is_del || !$this->request->merchant()->mer_state || !$this->request->merchant()->status) ? 0 : 1;
|
||||||
$data['mer_id'] = $this->request->merId();
|
$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);
|
$this->repository->edit($id, $data, $this->request->merId(), 0);
|
||||||
return app('json')->success('编辑成功');
|
return app('json')->success('编辑成功');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user