From 19b1cde138a2f1e0309fb2d983628062d87f3174 Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Thu, 21 Mar 2024 11:48:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=95=86=E6=88=B7=E5=A4=B4?= =?UTF-8?q?=E5=83=8F,=E5=8F=AA=E6=9C=89=E5=AE=A1=E6=A0=B8=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/product/ProductRepository.php | 13 +++++++++---- .../api/store/merchant/MerchantIntention.php | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index 584a441e..e8950684 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -1908,8 +1908,11 @@ class ProductRepository extends BaseRepository */ public function switchStatus($id, $data, $admin_info = []) { - $data['is_used'] =1; - $data['is_show'] =1; + if ($data['status'] == 1) { + $data['is_used'] =1; + $data['is_show'] =1; + } + $product = $this->getSearch([])->find($id); $this->dao->update($id, $data); $status = $data['status']; @@ -1942,8 +1945,10 @@ class ProductRepository extends BaseRepository */ public function batchSwitchStatus(array $id, array $data, $admin_info = []) { - $data['is_show'] =1; - $data['is_used'] =1; + if ($data['status'] == 1) { + $data['is_used'] =1; + $data['is_show'] =1; + } $productData = $this->getSearch([])->where('product_id', 'in', $id)->select(); foreach ($productData as $product) { $product_type = $product['product_type']; diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index 5a2f72ed..07f170a2 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -361,6 +361,7 @@ class MerchantIntention extends BaseController ->select(); //后期看改 foreach ($list as $k => &$v){ + $v['mer_avatar'] = Merchant::getDB()->where('uid',$v['uid'])->value('mer_avatar'); $v['check_name'] = "小方"; $v['check_phone'] = "18715236963"; }