|
@@ -277,6 +277,13 @@ public class DiagramController {
|
|
|
@ApiOperation("系统图状态变更")
|
|
|
@PostMapping("/update/name")
|
|
|
public CommonResult<Boolean> updateName(@RequestBody Map<String, String> params) {
|
|
|
+ if (params == null) {
|
|
|
+ throw new BusinessException(ResponseCode.A0400.getCode(), "请求参数为空");
|
|
|
+ }
|
|
|
+ String name = params.get("name");
|
|
|
+ if (StrUtil.isBlank(name) || name.length() < 3 || name.length() > 15) {
|
|
|
+ throw new BusinessException(ResponseCode.A0400.getCode(), "名称长度不能小于3,不能超过15");
|
|
|
+ }
|
|
|
return ResultHelper.single(dataStrategy.updateName(params.get("name"), params.get("id")));
|
|
|
}
|
|
|
|