添加修改状态功能
This commit is contained in:
parent
9fb3dcfba1
commit
1a813e6fa2
@ -67,6 +67,9 @@ class LocalStoreGoods extends Api
|
||||
{
|
||||
$form = $this->request->post();
|
||||
$result = LocalStoreGoodsLogic::setState($form, $this->user_id);
|
||||
|
||||
if ($result) {
|
||||
return JsonServer::success('操作成功');
|
||||
}
|
||||
return JsonServer::error('操作失败');
|
||||
}
|
||||
}
|
||||
@ -156,11 +156,9 @@ class LocalStoreGoodsLogic extends Logic
|
||||
{
|
||||
if (isset(self::$STATUS[$form['type']])) {
|
||||
$state = self::$STATUS[$form['type']];
|
||||
dump($state);die;
|
||||
$result = LocalStoreGoods::where(['id' => $form['id'], 'user_id' => $user_id, 'lstore_id' => $form['lstore_id']])->update([
|
||||
'state' => $state,
|
||||
]);
|
||||
|
||||
return $result;
|
||||
}
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user