diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/sync/controller/ShopSyncImportController.java b/mall-shop/src/main/java/com/suisung/mall/shop/sync/controller/ShopSyncImportController.java index a6c54ccb..23e65877 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/sync/controller/ShopSyncImportController.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/sync/controller/ShopSyncImportController.java @@ -1,6 +1,7 @@ package com.suisung.mall.shop.sync.controller; import com.suisung.mall.common.api.CommonResult; +import com.suisung.mall.common.exception.ApiException; import com.suisung.mall.common.service.impl.BaseControllerImpl; import com.suisung.mall.shop.sync.service.ShopSyncImportService; import io.swagger.annotations.ApiOperation; @@ -79,6 +80,9 @@ public class ShopSyncImportController extends BaseControllerImpl { @ApiOperation(value = "商品数据导入", notes = "分类数据导入") @RequestMapping(value = "/shopImportData", method = RequestMethod.POST) public CommonResult shopImportData(@RequestParam("file") MultipartFile file,@RequestParam("storeId")String storeId) { + if(!shopSyncImportService.checkIsPlate()){ + throw new ApiException("用户无权限"); + } shopSyncImportService.importShopsData(file,storeId); return CommonResult.success("服务器正则处理文件,稍后查看商品列表"); }