From 783173972c41fa9c750b9cc6559d6e281d61e5b2 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 18 Jul 2022 10:44:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HighGasClassGroupTaskController.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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);