|  |  | 
 |  |  | import com.doumee.service.CateParamSelectService; | 
 |  |  | import com.doumee.service.business.GoodsService; | 
 |  |  | import io.swagger.annotations.*; | 
 |  |  | import lombok.extern.java.Log; | 
 |  |  | import org.apache.shiro.SecurityUtils; | 
 |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | 
 |  |  |     @PreventRepeat | 
 |  |  |     @ApiOperation("企业新建商品") | 
 |  |  |     @PostMapping("/companyCreate") | 
 |  |  | //    @RequiresPermissions("business:goods:create") | 
 |  |  |     @RequiresPermissions("business:goods:create") | 
 |  |  |     public ApiResponse companyCreate(@RequestBody Goods goods) { | 
 |  |  |         goodsService.companyCreate(goods); | 
 |  |  |         cateParamSelectService.dealGroupVals(goods.getCompanyId()); | 
 |  |  |         cateParamSelectService.dealCateParamSelect(); | 
 |  |  |         return ApiResponse.success("操作成功"); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |     @PostMapping("/createPlat") | 
 |  |  |     @RequiresPermissions("business:goods:create") | 
 |  |  |     public ApiResponse createPlat(@RequestBody GoodCreatePlatRequest param) { | 
 |  |  |         return ApiResponse.success(goodsService.createPlat(param)); | 
 |  |  |         goodsService.openSyncSwitch(); | 
 |  |  |         goodsService.createPlat(param); | 
 |  |  | //        cateParamSelectService.dealCateParamSelect(); | 
 |  |  |         return ApiResponse.success("同步操作成功,请稍后刷新查看商品同步信息"); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("根据ID删除") | 
 |  |  | 
 |  |  |     @RequiresPermissions("business:goods:delete") | 
 |  |  |     public ApiResponse deleteById(@PathVariable Integer id) { | 
 |  |  |         goodsService.deleteById(id); | 
 |  |  |         cateParamSelectService.dealCateParamSelect(); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |             idList.add(Integer.valueOf(id)); | 
 |  |  |         } | 
 |  |  |         goodsService.deleteByIdInBatch(idList); | 
 |  |  |         cateParamSelectService.dealCateParamSelect(); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |     @RequiresPermissions("business:goods:update") | 
 |  |  |     public ApiResponse companyUpdateById(@RequestBody Goods goods) { | 
 |  |  |         goodsService.companyUpdateById(goods); | 
 |  |  |         cateParamSelectService.dealCateParamSelect(); | 
 |  |  |         return ApiResponse.success(null); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |     @ApiImplicitParams({ | 
 |  |  |             @ApiImplicitParam(name = "file", value = "file", required = true, paramType = "query", dataType = "file", dataTypeClass = File.class), | 
 |  |  |     }) | 
 |  |  | //    @RequiresPermissions("business:goods:create") | 
 |  |  |     @RequiresPermissions("business:goods:create") | 
 |  |  |     public ApiResponse<Integer> importExcel (@ApiParam(value = "file") MultipartFile file) { | 
 |  |  |         return ApiResponse.success(goodsService.importBatch(file)); | 
 |  |  |         Integer val = goodsService.importBatch(file); | 
 |  |  |         cateParamSelectService.dealCateParamSelect(); | 
 |  |  |         return ApiResponse.success(val); | 
 |  |  |     } | 
 |  |  |     @ApiOperation("导入图片模板") | 
 |  |  |     @PostMapping("/importExcel") | 
 |  |  |     @ApiImplicitParams({ | 
 |  |  |             @ApiImplicitParam(name = "file", value = "file", required = true, paramType = "query", dataType = "file", dataTypeClass = File.class), | 
 |  |  |     }) | 
 |  |  |     @RequiresPermissions("business:goods:update") | 
 |  |  |     public ApiResponse<Integer> importImgExcel (@ApiParam(value = "file") MultipartFile file) { | 
 |  |  |         Integer val = goodsService.importBatchImg(file); | 
 |  |  |         return ApiResponse.success(val); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | 
 |  |  |     public ApiResponse<String> batchUpdateDisableById(@RequestBody BatchDisableDTO batchDisableDTO) { | 
 |  |  |         return ApiResponse.success(goodsService.batchUpdateDisableById(batchDisableDTO)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  |     @ApiOperation("列表 - H5") | 
 |  |  |     @PostMapping("/list") |