diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java index cb7f414587..2882f9977f 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/OperCustomizeOpenFeignClient.java @@ -106,7 +106,7 @@ public interface OperCustomizeOpenFeignClient { Result> resiCategoryStatsListShowd(@RequestBody IcResiCategoryStatsConfigFormDTO formDTO); @PostMapping("/oper/customize/resicategorystatsconfig/resicategorywarnlist") - Result> resiCategoryWarnList(); + Result> resiCategoryWarnList(@RequestParam String customerId); @PostMapping("/oper/customize/resicategorystatsconfig/resicategorywarninfobyid") Result resiCategoryWarnInfoById(@RequestBody IcResiCategoryWarnConfigDTO dto); diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java index a793685644..a75999eb0e 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/feign/fallback/OperCustomizeOpenFeignClientFallback.java @@ -90,8 +90,8 @@ public class OperCustomizeOpenFeignClientFallback implements OperCustomizeOpenFe } @Override - public Result> resiCategoryWarnList() { - return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "resiCategoryWarnList"); + public Result> resiCategoryWarnList(String customerId) { + return ModuleUtils.feignConError(ServiceConstant.OPER_CUSTOMIZE_SERVER, "resiCategoryWarnList",customerId); } @Override diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java index ef94b7b4ac..26f3537689 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/ResiCategoryStatsConfigController.java @@ -41,10 +41,7 @@ import com.epmet.service.IcResiCategoryStatsConfigService; import com.epmet.service.ResiCategoryStatsConfigService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.StringUtils; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.List; @@ -148,11 +145,11 @@ public class ResiCategoryStatsConfigController { } @PostMapping("resicategorywarnlist") - public Result> resiCategoryWarnList(@LoginUser TokenDto tokenDTO){ + public Result> resiCategoryWarnList(@RequestParam String customerId){ //获取预警配置列表 List warnConfigEntityList = icResiCategoryWarnConfigDao.selectList(new QueryWrapper() .lambda() - .eq(IcResiCategoryWarnConfigEntity::getCustomerId,tokenDTO.getCustomerId()) + .eq(IcResiCategoryWarnConfigEntity::getCustomerId,customerId) .orderByAsc(IcResiCategoryWarnConfigEntity::getSort)); return new Result>().ok(ConvertUtils.sourceToTarget(warnConfigEntityList, IcResiCategoryWarnConfigDTO.class)); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java index 60d355cbf4..3b12bcd10d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StatsResiWarnServiceImpl.java @@ -56,7 +56,7 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService { } List icResiCategoryStatsConfigDTOList = statsResult.getData(); //feign获取当前需要预警的配置信息以及阈值 - Result> warnResult = operCustomizeOpenFeignClient.resiCategoryWarnList(); + Result> warnResult = operCustomizeOpenFeignClient.resiCategoryWarnList(customerId); if (!warnResult.success() || null == warnResult.getData()) { throw new RenException("预警配置查询失败:"+ warnResult.getMsg()); @@ -200,7 +200,7 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService { @Transactional(rollbackFor = Exception.class) public void resiWarn(String customerId) { // 获取预警配置项 - Result> warnResult = operCustomizeOpenFeignClient.resiCategoryWarnList(); + Result> warnResult = operCustomizeOpenFeignClient.resiCategoryWarnList(customerId); if (!warnResult.success() || null == warnResult.getData()) { throw new RenException("预警配置查询失败:"+ warnResult.getMsg()); } @@ -238,7 +238,7 @@ public class StatsResiWarnServiceImpl implements StatsResiWarnService { @Override public void resiWarnByOne(String customerId, String userId) { // 获取预警配置项 - Result> warnResult = operCustomizeOpenFeignClient.resiCategoryWarnList(); + Result> warnResult = operCustomizeOpenFeignClient.resiCategoryWarnList(customerId); if (!warnResult.success() || null == warnResult.getData()) { throw new RenException("预警配置查询失败:"+ warnResult.getMsg()); }