feat 增加 角色菜单关系表
This commit is contained in:
parent
daccc6909f
commit
eb04c6723b
|
|
@ -29,7 +29,7 @@ public class AuthServiceImpl implements IAuthService {
|
|||
ret.add("*");
|
||||
return ret;
|
||||
} else {
|
||||
|
||||
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
package com.mdd.admin.service.impl.system;
|
||||
|
||||
import com.mdd.admin.service.system.ISystemRoleMenuService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 角色菜单关系实现类
|
||||
*/
|
||||
@Service
|
||||
public class SystemRoleMenuServiceImpl implements ISystemRoleMenuService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<Integer> getMenuIdsByRoleIds(List<Integer> roleIds) {
|
||||
List<Integer> ret = new ArrayList<>();
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.mdd.admin.service.system;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 角色菜单关系接口类
|
||||
*/
|
||||
public interface ISystemRoleMenuService {
|
||||
|
||||
/**
|
||||
* 根据roleIds 返回menuIds
|
||||
* @param roleIds
|
||||
* @return
|
||||
*/
|
||||
List<Integer> getMenuIdsByRoleIds(List<Integer> roleIds);
|
||||
}
|
||||
|
|
@ -1,7 +1,9 @@
|
|||
package com.mdd.common.entity.system;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.lettuce.core.dynamic.annotation.Key;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -22,6 +24,7 @@ public class SystemRole implements Serializable {
|
|||
private String name;
|
||||
|
||||
@ApiModelProperty("描述")
|
||||
@TableField(value = "`desc`")
|
||||
private String desc;
|
||||
|
||||
@ApiModelProperty("角色排序")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
package com.mdd.common.entity.system;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("角色菜单关系实体")
|
||||
public class SystemRoleMenu implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("角色ID")
|
||||
private Integer roleId;
|
||||
|
||||
@ApiModelProperty("菜单ID")
|
||||
private Integer menuId;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.mdd.common.mapper.system;
|
||||
|
||||
import com.mdd.common.core.basics.IBaseMapper;
|
||||
import com.mdd.common.entity.system.SystemMenu;
|
||||
import com.mdd.common.entity.system.SystemRoleMenu;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 系统菜单Mapper
|
||||
*/
|
||||
@Mapper
|
||||
public interface SystemRoleMenuMapper extends IBaseMapper<SystemRoleMenu> {
|
||||
}
|
||||
Loading…
Reference in New Issue