mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 05:42:06 +08:00
菜单新增/修改重名校验增加归属类型条件筛选
This commit is contained in:
+3
-2
@@ -6,6 +6,7 @@ import com.cf.imes.module.system.controller.admin.permission.vo.menu.MenuListReq
|
||||
import com.cf.imes.module.system.controller.admin.permission.vo.menu.MenuSaveVO;
|
||||
import com.cf.imes.module.system.dal.dataobject.permission.MenuDO;
|
||||
import com.cf.imes.module.system.dal.mysql.permission.MenuMapper;
|
||||
import com.cf.imes.module.system.enums.permission.MenuSourceTypeEnum;
|
||||
import com.cf.imes.module.system.enums.permission.MenuTypeEnum;
|
||||
import com.cf.imes.module.system.service.organ.OrganService;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -283,7 +284,7 @@ public class MenuServiceImplTest extends BaseDbUnitTest {
|
||||
String otherSonMenuName = randomString();
|
||||
|
||||
// 调用,无需断言
|
||||
menuService.validateMenu(parentId, otherSonMenuName, otherSonMenuId);
|
||||
menuService.validateMenu(parentId, otherSonMenuName, otherSonMenuId, MenuSourceTypeEnum.PRODUCTION.getType());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -296,7 +297,7 @@ public class MenuServiceImplTest extends BaseDbUnitTest {
|
||||
String otherSonMenuName = sonMenu.getName(); //相同名称
|
||||
|
||||
// 调用,并断言异常
|
||||
assertServiceException(() -> menuService.validateMenu(parentId, otherSonMenuName, otherSonMenuId),
|
||||
assertServiceException(() -> menuService.validateMenu(parentId, otherSonMenuName, otherSonMenuId, MenuSourceTypeEnum.PRODUCTION.getType()),
|
||||
MENU_NAME_DUPLICATE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user