控制平台导入权限问题解决

This commit is contained in:
liyj 2025-12-31 20:35:52 +08:00
parent 0bb857f53f
commit 599a64a9f6

View File

@ -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("服务器正则处理文件,稍后查看商品列表");
}