소스 검색

update

Signed-off-by: anderx <312518615@qq.com>
anderx 5 년 전
부모
커밋
a255656536
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/main/java/com/goafanti/demandCollection/controller/DemandCollectionApiController.java

+ 2 - 1
src/main/java/com/goafanti/demandCollection/controller/DemandCollectionApiController.java

@@ -4,6 +4,7 @@ package com.goafanti.demandCollection.controller;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RestController;
@@ -27,7 +28,7 @@ public class DemandCollectionApiController  extends CertifyApiController {
 	@RequestMapping(value="/open/addDemandCollection",method = RequestMethod.POST)
 	public Result addDemandCollection(DemandCollection d){
 		Result res =new Result();
-		if (d.getDwmc()==null) {
+		if (StringUtils.isBlank(d.getDwmc())) {
 			res.getError().add(buildError("名称必须指定","名称必须指定"));
 			return res;
 		}