Browse Source

修改logo,修改普通商户不能更改商品

dev
mike 3 years ago
parent
commit
0bbfcaefec
  1. 12
      app/Controller/v3/GoodsController.php
  2. 2
      app/Service/v3/Implementations/UserCenterBlockService.php

12
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);

2
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'],
]
]
];

Loading…
Cancel
Save