优化本地商家商品添加、修改

This commit is contained in:
wangxiaowei 2024-08-27 11:50:20 +08:00
parent 56184f233e
commit 9d0f8aee42
2 changed files with 1 additions and 13 deletions

@ -38,19 +38,6 @@ class LocalStoreGoods extends Api
return JsonServer::success('提交成功', [], 1, 1);
}
// 商家修改商品
public function editGoods()
{
$form = $this->request->post();
(new LocalStoreGoodsValidate())->goCheck();
$result = LocalStoreGoodsLogic::editGoods($form, $this->user_id);
if ($result === false) {
$error = LocalStoreGoodsLogic::getError() ?: '提交失败';
return JsonServer::error($error);
}
return JsonServer::success('提交成功', [], 1, 1);
}
public function shopDetails()
{
$get = $this->request->get();

@ -103,6 +103,7 @@ class LocalStoreGoodsLogic extends Logic
'price' => $form['price'],
'desc' => $form['desc'] ?? '',
'details' => $form['details'] ?? '',
'audit_status' => self::$AUDIT_STATUS['audit_status_stay'],
'update_time' => time(),
]);