菜单模块
This commit is contained in:
parent
f2d9c17648
commit
9e97575a54
|
|
@ -110,15 +110,15 @@ public class MenuServiceImpl implements MenuService {
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult addOrUpdateMenu(MenuVo vo) {
|
public AjaxResult addOrUpdateMenu(MenuVo vo) {
|
||||||
try {
|
try {
|
||||||
if(vo.getParentId() == null){
|
|
||||||
vo.setParentId(0);
|
|
||||||
}
|
|
||||||
int result = mapper.isMenuName(vo);
|
|
||||||
if(!Objects.equals(vo.getMenuType(),Constant.MENU_TYPE)){
|
if(!Objects.equals(vo.getMenuType(),Constant.MENU_TYPE)){
|
||||||
if(StringUtils.isBlank(vo.getMenuUrl())){
|
if(StringUtils.isBlank(vo.getMenuUrl())){
|
||||||
return AjaxResult.error("菜单地址不能为空");
|
return AjaxResult.error("菜单地址不能为空");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(vo.getParentId() == null){
|
||||||
|
vo.setParentId(0);
|
||||||
|
}
|
||||||
|
int result = mapper.isMenuName(vo);
|
||||||
if (vo.getMenuId() == null) {
|
if (vo.getMenuId() == null) {
|
||||||
vo.setType(1);
|
vo.setType(1);
|
||||||
vo.setCreateTime(DateTimeHelper.getNowTime());
|
vo.setCreateTime(DateTimeHelper.getNowTime());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue