diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/HotSubjectTagFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/HotSubjectTagFormDTO.java index 7f82d796ad..3208ad1137 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/HotSubjectTagFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/HotSubjectTagFormDTO.java @@ -2,6 +2,7 @@ package com.epmet.dto.form; import lombok.Data; +import javax.validation.constraints.NotBlank; import java.io.Serializable; /** @@ -12,7 +13,10 @@ import java.io.Serializable; @Data public class HotSubjectTagFormDTO implements Serializable { private static final long serialVersionUID = -5526800827207175876L; + public interface HotSubjectTagGroup {} private String customerId; + @NotBlank(message = "orgId不能为空", groups = HotSubjectTagGroup.class) private String orgId; + @NotBlank(message = "pids不能为空", groups = HotSubjectTagGroup.class) private String pids; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java index 1a55bdf7e6..df840e5c78 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java @@ -107,6 +107,7 @@ public class SpecialSubjectController { */ @PostMapping("hot-subject-taglist") public Result> hotSubjectTagList(@LoginUser TokenDto tokenDto, @RequestBody HotSubjectTagFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO); formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result>().ok(specialSubjectService.hotSubjectTagList(formDTO)); }