代码生成时,如果是管理后台,必须设置菜单

This commit is contained in:
YunaiV 2022-03-12 01:31:26 +08:00
parent 6f8baa3110
commit c11a14b9da

View File

@ -37,7 +37,7 @@ public class CodegenUpdateReqVO {
@ApiModelProperty(value = "编号", required = true, example = "1")
private Long id;
@AssertTrue(message = "生成失败,必须设置上级菜单")
@AssertTrue(message = "上级菜单不能为空")
public boolean isParentMenuIdValid() {
// 生成场景为管理后台时必须设置上级菜单不然生成的菜单 SQL 是无父级菜单的
return ObjectUtil.notEqual(getScene(), CodegenSceneEnum.ADMIN.getScene())