From 0bbfcaefecd42b1f6363aea2aba7f221c3fcca24 Mon Sep 17 00:00:00 2001 From: mike Date: Tue, 30 Aug 2022 15:15:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9logo=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=99=AE=E9=80=9A=E5=95=86=E6=88=B7=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=95=86=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/v3/GoodsController.php | 12 ++++++++++++ .../v3/Implementations/UserCenterBlockService.php | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/Controller/v3/GoodsController.php b/app/Controller/v3/GoodsController.php index 9e5cfd7..c7ef34b 100644 --- a/app/Controller/v3/GoodsController.php +++ b/app/Controller/v3/GoodsController.php @@ -16,6 +16,7 @@ use App\Service\v3\Interfaces\CollectStoreServiceInterface; use Hyperf\Di\Annotation\Inject; use App\Service\v3\Interfaces\GoodsServiceInterface; use App\Service\v3\Interfaces\GoodsActivityServiceInterface; +use App\Service\v3\Interfaces\UserInfoServiceInterface; use App\Constants\v3\Goods; use App\Request\v3\GoodsRequest; class GoodsController extends BaseController @@ -50,6 +51,12 @@ class GoodsController extends BaseController */ protected $categoryService; + /** + * @Inject + * @var UserInfoServiceInterface + */ + protected $userInfoService; + public function detail(GoodsRequest $request) { $params = $this->request->all(); @@ -117,6 +124,11 @@ class GoodsController extends BaseController $data['user_id'] = $this->request->input('user_id',0); $data['cover_img'] = $this->request->input('cover_img',0); $banners = $this->request->input('banner',0); + + if(!$this->userInfoService->getEmployeesByUID($data['user_id'])){ + throw new ErrorCodeException(ErrorCode::GOODS_NOT_EXISTS); + } + $res = $this->goodsService->update($data); if(!empty($banners)){ $banners = json_decode($banners,true); diff --git a/app/Service/v3/Implementations/UserCenterBlockService.php b/app/Service/v3/Implementations/UserCenterBlockService.php index 0996de2..0b8c239 100644 --- a/app/Service/v3/Implementations/UserCenterBlockService.php +++ b/app/Service/v3/Implementations/UserCenterBlockService.php @@ -39,7 +39,7 @@ class UserCenterBlockService implements UserCenterBlockServiceInterface ['name' => '当面付订单查询', 'icon' => $img_host . 'user_icons/offline_orders2.png', 'type' => 'page', 'path' => '/pages/facepay/facepay','command'=>'offline_orders'], ['name' => '在线客服', 'icon' => $img_host . 'user_icons/online_kf2.png', 'type' => 'page', 'path' => '','command'=>'online_kf'], ['name' => '联系服务站', 'icon' => $img_host . 'user_icons/contact_fwz2.png', 'type' => 'page', 'path' => '/pages/contactMarket/contactMarket','command'=>'contact_fwz'], - ['name' => '关于链街', 'icon' => $img_host . 'user_icons/about_lz2.png', 'type' => 'page', 'path' => '/pages/aboutUs/aboutUs','command'=>'about'], + ['name' => '关于华华', 'icon' => $img_host . 'user_icons/about_lz3.png', 'type' => 'page', 'path' => '/pages/aboutUs/aboutUs','command'=>'about'], ] ] ];