From 8a66d9162071f41e553cffb9672d5793b8906623 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 26 Sep 2024 11:38:54 +0800 Subject: [PATCH] =?UTF-8?q?feat(system=5Fstore=5Fstorage):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=95=86=E5=93=81=E5=85=A5=E5=BA=93API=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SystemStoreStorageController.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/api/controller/system_store_storage/SystemStoreStorageController.php b/app/api/controller/system_store_storage/SystemStoreStorageController.php index a2dcf4cea..2aec9d636 100644 --- a/app/api/controller/system_store_storage/SystemStoreStorageController.php +++ b/app/api/controller/system_store_storage/SystemStoreStorageController.php @@ -6,7 +6,8 @@ namespace app\api\controller\system_store_storage; use app\api\controller\BaseApiController; use app\api\lists\system_store_storage\SystemStoreStorageLists; use app\api\lists\system_store_storage\SystemStoreStorageGroupLists; - +use app\common\model\store_branch_product\StoreBranchProduct; +use app\common\model\system_store_storage\SystemStoreStorage; /** * 门店入库控制器 @@ -36,4 +37,15 @@ class SystemStoreStorageController extends BaseApiController return $this->dataLists(new SystemStoreStorageGroupLists()); } + public function warehousing_add() { + $params = $this->request->post(); + $find=SystemStoreStorage::where('id',$params['id'])->find(); + if($find){ + $find->status=1; + $find->save(); + StoreBranchProduct::where(['product_id'=>$find['product_id'],'store_id'=>$find['store_id']])->inc('stock',$find['nums'])->update(); + return $this->success('操作成功'); + } + return $this->fail('操作失败'); + } }