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