|  |  |  | 
|---|
|  |  |  | //        shopService.dealShopNamePath(); | 
|---|
|  |  |  | return ApiResponse.success("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation(value = "组织Fcode个性化信息导入" ,notes = "组织信息初始化导入") | 
|---|
|  |  |  | @ApiOperation(value = "组织Fcode个性化信息导入" ,notes = "组织Fcode个性化信息导入") | 
|---|
|  |  |  | @PostMapping("/importFcodeBatch") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(name = "file", value = "file", required = true, paramType = "query", dataType = "file", dataTypeClass = File.class), | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @RequiresPermissions("business:shop:create") | 
|---|
|  |  |  | public ApiResponse<String> importFcodeBatch (@ApiParam(value = "file") MultipartFile file ) { | 
|---|
|  |  |  | //        Boolean importing = (Boolean) redisTemplate.opsForValue().get(Constants.RedisKeys.IMPORTING_SHOP); | 
|---|
|  |  |  | //        if(importing!=null && importing){ | 
|---|
|  |  |  | //            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,已存在导入任务正在执行中,请稍后再试!"); | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | shopService.importFcodeBatch(file); | 
|---|
|  |  |  | return ApiResponse.success("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation(value = "组织品类初始化导入" ,notes = "组织品类初始化导入") | 
|---|
|  |  |  | @PostMapping("/importCategoryBatch") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(name = "file", value = "file", required = true, paramType = "query", dataType = "file", dataTypeClass = File.class), | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @RequiresPermissions("business:shop:create") | 
|---|
|  |  |  | public ApiResponse<String> importCategoryBatch (@ApiParam(value = "file") MultipartFile file ) { | 
|---|
|  |  |  | //        Boolean importing = (Boolean) redisTemplate.opsForValue().get(Constants.RedisKeys.IMPORTING_SHOP); | 
|---|
|  |  |  | //        if(importing!=null && importing){ | 
|---|
|  |  |  | //            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,已存在导入任务正在执行中,请稍后再试!"); | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | shopService.importCategoryBatch(file); | 
|---|
|  |  |  | return ApiResponse.success("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @ApiOperation(value = "重置上下级关系" ,notes = "重置上下级关系") | 
|---|
|  |  |  | 
|---|
|  |  |  | public ApiResponse<String> resetRelations ( ) { | 
|---|
|  |  |  | Boolean importing = (Boolean) redisTemplate.opsForValue().get(Constants.RedisKeys.IMPORTING_SHOP); | 
|---|
|  |  |  | if(importing!=null && importing){ | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,已存在导入或者上下级重置任务正在执行中,请稍后再试!"); | 
|---|
|  |  |  | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,已存在导入任务正在执行中,请稍后再试!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | shopService.dealShopNamePath(); | 
|---|
|  |  |  | return ApiResponse.success("操作成功"); | 
|---|