diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighGasClassGroupTaskController.java b/hai-bweb/src/main/java/com/bweb/controller/HighGasClassGroupTaskController.java index 8ff59b03..ee148fb0 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighGasClassGroupTaskController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighGasClassGroupTaskController.java @@ -16,8 +16,10 @@ import com.hai.entity.HighDevice; import com.hai.entity.HighGasClassGroupTask; import com.hai.enum_type.DeviceTypeEnum; import com.hai.enum_type.GasClassGroupTaskStatus; +import com.hai.enum_type.UserObjectTypeEnum; import com.hai.model.GasClassGroupTaskDataCount; import com.hai.model.ResponseData; +import com.hai.model.UserInfoModel; import com.hai.service.HighDeviceService; import com.hai.service.HighGasClassGroupTaskService; import io.swagger.annotations.Api; @@ -177,8 +179,18 @@ public class HighGasClassGroupTaskController { @RequestParam(name = "pageSize", required = true) Integer pageSize) { try { Map param = new HashMap<>(); + + UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); + } + + if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type3.getType())) { + param.put("merchantStoreId", userInfoModel.getMerchantStore().getId()); + } else { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); + } param.put("gasClassGroupId", gasClassGroupId); - param.put("merchantStoreId", merchantStoreId); param.put("status", status); PageHelper.startPage(pageNum, pageSize);