|
|
@@ -20,6 +20,7 @@ import com.goafanti.common.enums.ProjectAuditStatus;
|
|
|
import com.goafanti.common.model.JtBusinessCategory;
|
|
|
import com.goafanti.common.model.JtBusinessProject;
|
|
|
import com.goafanti.common.model.JtTag;
|
|
|
+import com.goafanti.common.utils.StringUtils;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping(value = "/api/user/jtBusiness")
|
|
|
@@ -115,12 +116,28 @@ public class UserJtBusinessController extends CertifyApiController{
|
|
|
jtBusinessProject.setCreateTime(null);
|
|
|
jtBusinessProject.setNumber(null);
|
|
|
disposeProjectParam(result, jtBusinessProject);
|
|
|
- if(result.getError().size()>0) {
|
|
|
- return result;
|
|
|
- }
|
|
|
if(jtBusinessProject.getPrice()==null) {
|
|
|
result.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "价格不可为空,"));
|
|
|
}
|
|
|
+ //判断各项数据长度
|
|
|
+ if(StringUtils.isNotBlank(jtBusinessProject.getName()) && jtBusinessProject.getName().length() > 16){
|
|
|
+ result.getError().add(buildError("16", "项目名称字数不能超过16"));
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(jtBusinessProject.getAdvertisement()) && jtBusinessProject.getAdvertisement().length() > 128){
|
|
|
+ result.getError().add(buildError("128", "项目营销说明字数不能超过128"));
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(jtBusinessProject.getValue()) && jtBusinessProject.getValue().length() > 1024){
|
|
|
+ result.getError().add(buildError("1024", "业务项目价值及作用字数不能超过1024"));
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(jtBusinessProject.getApplyConditions()) && jtBusinessProject.getApplyConditions().length() > 512){
|
|
|
+ result.getError().add(buildError("512", "项目客户条件字数不能超过512"));
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(jtBusinessProject.getIntroduce()) && jtBusinessProject.getIntroduce().length() > 2048){
|
|
|
+ result.getError().add(buildError("2048", "项目服务内容字数不能超过2048"));
|
|
|
+ }
|
|
|
+ if(result.getError().size()>0) {
|
|
|
+ return result;
|
|
|
+ }
|
|
|
jtBusinessService.updateProject(jtBusinessProject);
|
|
|
return result;
|
|
|
}
|