diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpUpdateSendDataController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpUpdateSendDataController.java index 049dd0cde9..0704f912c6 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpUpdateSendDataController.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/WxmpUpdateSendDataController.java @@ -28,6 +28,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.WxmpUpdateSendDataDTO; import com.epmet.excel.WxmpUpdateSendDataExcel; import com.epmet.service.WxmpUpdateSendDataService; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -45,7 +46,7 @@ import java.util.Map; @RestController @RequestMapping("wxmpupdatesenddata") public class WxmpUpdateSendDataController { - + @Autowired private WxmpUpdateSendDataService wxmpUpdateSendDataService; @@ -57,6 +58,9 @@ public class WxmpUpdateSendDataController { @GetMapping("{id}") public Result get(@PathVariable("id") String id){ + if (StringUtils.isBlank(id) || "undefined".equals(id)){ + return new Result().error(8000,"id不能为空"); + } WxmpUpdateSendDataDTO data = wxmpUpdateSendDataService.get(id); return new Result().ok(data); } @@ -91,4 +95,4 @@ public class WxmpUpdateSendDataController { ExcelUtils.exportExcelToTarget(response, null, list, WxmpUpdateSendDataExcel.class); } -} \ No newline at end of file +}