Bladeren bron

update

Signed-off-by: anderx <312518615@qq.com>
anderx 5 jaren geleden
bovenliggende
commit
a255656536

+ 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;
 		}