提交 cef5de1a 编写于 作者: 薛            之            谦's avatar 薛 之 谦

[Fix] fix item name and description length are not verified.

上级 c3e78af6
......@@ -100,7 +100,7 @@ public class BaseController {
return success(msg, datalist);
} else {
Integer code = status.getCode();
String msg = ((Status) result.get(Constants.MSG)).getMsg();
String msg = (String)result.get("msg");
return error(code, msg);
}
}
......
......@@ -342,14 +342,12 @@ public class ProjectServiceImpl extends BaseServiceImpl implements ProjectServic
Map<String, Object> result = new HashMap<>();
if(checkLengthIllegal(projectName, Constants.NAME_LENGTH_GO_ONLINE)) {
result.put(Constants.STATUS,Status.FAILED);
result.put(Constants.MSG, Status.PROJECT_NAME_TOO_LONG_ERROR);
putMsg(result,Status.PROJECT_NAME_TOO_LONG_ERROR);
return result;
}
if(checkLengthIllegal(desc, Constants.DESC_LENGTH_GO_ONLINE)) {
result.put(Constants.STATUS,Status.FAILED);
result.put(Constants.MSG, Status.DESCRIPTION_TOO_LONG_ERROR);
putMsg(result,Status.DESCRIPTION_TOO_LONG_ERROR);
return result;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册