diff --git a/dao/src/main/kotlin/cn/bunny/dao/entity/system/MenuIcon.kt b/dao/src/main/kotlin/cn/bunny/dao/entity/system/MenuIcon.kt new file mode 100644 index 0000000..7aab8b5 --- /dev/null +++ b/dao/src/main/kotlin/cn/bunny/dao/entity/system/MenuIcon.kt @@ -0,0 +1,23 @@ +package cn.bunny.dao.entity.system + +import cn.bunny.dao.entity.BaseEntity +import com.baomidou.mybatisplus.annotation.TableName +import io.swagger.v3.oas.annotations.media.Schema +import lombok.experimental.Accessors + +/** + * + * + * 系统菜单图标 + * + * + * @author Bunny + * @since 2024-09-26 + */ +@Accessors(chain = true) +@TableName("sys_menu_icon") +@Schema(name = "MenuIcon对象", title = "系统菜单图标", description = "系统菜单图标") +data class MenuIcon( + @Schema(name = "iconName", title = "icon 名称") + var iconName: String? = null, +) : BaseEntity() \ No newline at end of file diff --git a/dao/src/main/kotlin/cn/bunny/dao/entity/system/Power.kt b/dao/src/main/kotlin/cn/bunny/dao/entity/system/Power.kt new file mode 100644 index 0000000..1b1a306 --- /dev/null +++ b/dao/src/main/kotlin/cn/bunny/dao/entity/system/Power.kt @@ -0,0 +1,35 @@ +package cn.bunny.dao.entity.system + +import cn.bunny.dao.entity.BaseEntity +import com.baomidou.mybatisplus.annotation.TableName +import io.swagger.annotations.ApiModel +import io.swagger.annotations.ApiModelProperty +import io.swagger.v3.oas.annotations.media.Schema +import lombok.experimental.Accessors + +/** + * + * + * + * + * + * @author Bunny + * @since 2024-09-26 + */ +@Accessors(chain = true) +@TableName("sys_power") +@ApiModel(value = "", description = "") +@Schema(name = "Power对象", title = "权限", description = "权限") +class Power( + @Schema(name = "parentId", title = "父级id") + var parentId: Long? = null, + + @ApiModelProperty("权限编码") + var powerCode: String? = null, + + @ApiModelProperty("权限名称") + var powerName: String? = null, + + @ApiModelProperty("请求路径") + var requestUrl: String? = null, +) : BaseEntity() diff --git a/dao/src/main/kotlin/cn/bunny/dao/entity/system/Role.kt b/dao/src/main/kotlin/cn/bunny/dao/entity/system/Role.kt new file mode 100644 index 0000000..7a95b27 --- /dev/null +++ b/dao/src/main/kotlin/cn/bunny/dao/entity/system/Role.kt @@ -0,0 +1,28 @@ +package cn.bunny.dao.entity.system + +import cn.bunny.dao.entity.BaseEntity +import com.baomidou.mybatisplus.annotation.TableName +import io.swagger.annotations.ApiModel +import io.swagger.v3.oas.annotations.media.Schema +import lombok.experimental.Accessors + +/** + * + * + * + * + * + * @author Bunny + * @since 2024-09-26 + */ +@Accessors(chain = true) +@TableName("sys_role") +@ApiModel(value = "", description = "") +@Schema(name = "Role对象", title = "角色", description = "角色") +class Role( + @Schema(name = "roleCode", title = "角色代码") + var roleCode: String? = null, + + @Schema(name = "description", title = "描述") + var description: String? = null, +) : BaseEntity() diff --git a/dao/src/main/kotlin/cn/bunny/dao/entity/system/RolePower.kt b/dao/src/main/kotlin/cn/bunny/dao/entity/system/RolePower.kt new file mode 100644 index 0000000..d70cf32 --- /dev/null +++ b/dao/src/main/kotlin/cn/bunny/dao/entity/system/RolePower.kt @@ -0,0 +1,26 @@ +package cn.bunny.dao.entity.system + +import cn.bunny.dao.entity.BaseEntity +import com.baomidou.mybatisplus.annotation.TableName +import io.swagger.v3.oas.annotations.media.Schema +import lombok.experimental.Accessors + +/** + * + * + * + * + * + * @author Bunny + * @since 2024-09-26 + */ +@Accessors(chain = true) +@TableName("sys_role_power") +@Schema(name = "RolePower对象", title = "角色权限关系", description = "角色权限关系") +class RolePower( + @Schema(name = "roleId", title = "角色id") + var roleId: String? = null, + + @Schema(name = "powerId", title = "权限id") + var powerId: String? = null, +) : BaseEntity() diff --git a/dao/src/main/kotlin/cn/bunny/dao/entity/system/Router.kt b/dao/src/main/kotlin/cn/bunny/dao/entity/system/Router.kt new file mode 100644 index 0000000..50c9210 --- /dev/null +++ b/dao/src/main/kotlin/cn/bunny/dao/entity/system/Router.kt @@ -0,0 +1,42 @@ +package cn.bunny.dao.entity.system + +import cn.bunny.dao.entity.BaseEntity +import com.baomidou.mybatisplus.annotation.TableName +import io.swagger.annotations.ApiModel +import io.swagger.annotations.ApiModelProperty +import lombok.experimental.Accessors + +/** + * + * + * 系统菜单表 + * + * + * @author Bunny + * @since 2024-09-26 + */ +@Accessors(chain = true) +@TableName("sys_router") +@ApiModel(value = "Router对象", description = "系统菜单表") +data class Router( + @ApiModelProperty("在项目中路径") + var routerPath: String? = null, + + @ApiModelProperty("路由名称") + var routeName: String? = null, + + @ApiModelProperty("父级id") + var parentId: Long? = null, + + @ApiModelProperty("路由title") + var title: String? = null, + + @ApiModelProperty("图标") + var icon: String? = null, + + @ApiModelProperty("等级") + var routerRank: Int? = null, + + @ApiModelProperty("是否显示") + var visible: Boolean? = null, +) : BaseEntity() diff --git a/dao/src/main/kotlin/cn/bunny/dao/entity/system/RouterPower.kt b/dao/src/main/kotlin/cn/bunny/dao/entity/system/RouterPower.kt new file mode 100644 index 0000000..d6586e3 --- /dev/null +++ b/dao/src/main/kotlin/cn/bunny/dao/entity/system/RouterPower.kt @@ -0,0 +1,26 @@ +package cn.bunny.dao.entity.system + +import com.baomidou.mybatisplus.annotation.TableName +import io.swagger.v3.oas.annotations.media.Schema +import lombok.experimental.Accessors +import java.io.Serializable + +/** + * + * + * 路由和权限关系表 + * + * + * @author Bunny + * @since 2024-09-26 + */ +@Accessors(chain = true) +@TableName("sys_router_power") +@Schema(name = "RouterPower对象", title = "路由和权限关系表", description = "路由和权限关系表") +data class RouterPower( + @Schema(name = "routerId", title = "路由ID") + var routerId: Long? = null, + + @Schema(name = "powerId", title = "角色ID") + var powerId: Long? = null, +) : Serializable diff --git a/dao/src/main/kotlin/cn/bunny/dao/entity/system/RouterRole.kt b/dao/src/main/kotlin/cn/bunny/dao/entity/system/RouterRole.kt new file mode 100644 index 0000000..a200f52 --- /dev/null +++ b/dao/src/main/kotlin/cn/bunny/dao/entity/system/RouterRole.kt @@ -0,0 +1,26 @@ +package cn.bunny.dao.entity.system + +import cn.bunny.dao.entity.BaseEntity +import com.baomidou.mybatisplus.annotation.TableName +import io.swagger.v3.oas.annotations.media.Schema +import lombok.experimental.Accessors + +/** + * + * + * + * + * + * @author Bunny + * @since 2024-09-26 + */ +@Accessors(chain = true) +@TableName("sys_router_role") +@Schema(name = "RouterRole对象", title = "路由角色关系", description = "路由角色关系") +data class RouterRole( + @Schema(name = "routerId", title = "路由ID") + var routerId: Long? = null, + + @Schema(name = "roleId", title = "角色ID") + var roleId: Long? = null, +) : BaseEntity() diff --git a/dao/src/main/kotlin/cn/bunny/dao/entity/system/UserRole.kt b/dao/src/main/kotlin/cn/bunny/dao/entity/system/UserRole.kt new file mode 100644 index 0000000..55f6e11 --- /dev/null +++ b/dao/src/main/kotlin/cn/bunny/dao/entity/system/UserRole.kt @@ -0,0 +1,26 @@ +package cn.bunny.dao.entity.system + +import cn.bunny.dao.entity.BaseEntity +import com.baomidou.mybatisplus.annotation.TableName +import io.swagger.v3.oas.annotations.media.Schema +import lombok.experimental.Accessors + +/** + * + * + * + * + * + * @author Bunny + * @since 2024-09-26 + */ +@Accessors(chain = true) +@TableName("sys_user_role") +@Schema(name = "UserRole对象", title = "用户角色关系", description = "用户角色关系") +class UserRole( + @Schema(name = "userId", title = "用户id") + var userId: String? = null, + + @Schema(name = "roleId", title = "角色id") + var roleId: String? = null, +) : BaseEntity() diff --git a/services/src/main/kotlin/cn/bunny/services/controller/PowerController.java b/services/src/main/kotlin/cn/bunny/services/controller/PowerController.java new file mode 100644 index 0000000..6163621 --- /dev/null +++ b/services/src/main/kotlin/cn/bunny/services/controller/PowerController.java @@ -0,0 +1,18 @@ +package cn.bunny.services.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *
+ * 前端控制器 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@RestController +@RequestMapping("/power") +public class PowerController { + +} diff --git a/services/src/main/kotlin/cn/bunny/services/controller/RoleController.java b/services/src/main/kotlin/cn/bunny/services/controller/RoleController.java new file mode 100644 index 0000000..fa03634 --- /dev/null +++ b/services/src/main/kotlin/cn/bunny/services/controller/RoleController.java @@ -0,0 +1,18 @@ +package cn.bunny.services.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 前端控制器 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@RestController +@RequestMapping("/role") +public class RoleController { + +} diff --git a/services/src/main/kotlin/cn/bunny/services/controller/RolePowerController.java b/services/src/main/kotlin/cn/bunny/services/controller/RolePowerController.java new file mode 100644 index 0000000..0dea0bb --- /dev/null +++ b/services/src/main/kotlin/cn/bunny/services/controller/RolePowerController.java @@ -0,0 +1,18 @@ +package cn.bunny.services.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 前端控制器 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@RestController +@RequestMapping("/rolePower") +public class RolePowerController { + +} diff --git a/services/src/main/kotlin/cn/bunny/services/controller/RouterPowerController.java b/services/src/main/kotlin/cn/bunny/services/controller/RouterPowerController.java new file mode 100644 index 0000000..03bed56 --- /dev/null +++ b/services/src/main/kotlin/cn/bunny/services/controller/RouterPowerController.java @@ -0,0 +1,18 @@ +package cn.bunny.services.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 路由和权限关系表 前端控制器 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@RestController +@RequestMapping("/routerPower") +public class RouterPowerController { + +} diff --git a/services/src/main/kotlin/cn/bunny/services/controller/RouterRoleController.java b/services/src/main/kotlin/cn/bunny/services/controller/RouterRoleController.java new file mode 100644 index 0000000..38390de --- /dev/null +++ b/services/src/main/kotlin/cn/bunny/services/controller/RouterRoleController.java @@ -0,0 +1,18 @@ +package cn.bunny.services.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 前端控制器 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@RestController +@RequestMapping("/routerRole") +public class RouterRoleController { + +} diff --git a/services/src/main/kotlin/cn/bunny/services/controller/UserRoleController.java b/services/src/main/kotlin/cn/bunny/services/controller/UserRoleController.java new file mode 100644 index 0000000..bc875a0 --- /dev/null +++ b/services/src/main/kotlin/cn/bunny/services/controller/UserRoleController.java @@ -0,0 +1,18 @@ +package cn.bunny.services.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *+ * 前端控制器 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@RestController +@RequestMapping("/userRole") +public class UserRoleController { + +} diff --git a/services/src/main/kotlin/cn/bunny/services/mapper/PowerMapper.java b/services/src/main/kotlin/cn/bunny/services/mapper/PowerMapper.java new file mode 100644 index 0000000..71a2de3 --- /dev/null +++ b/services/src/main/kotlin/cn/bunny/services/mapper/PowerMapper.java @@ -0,0 +1,27 @@ +package cn.bunny.services.mapper; + +import cn.bunny.dao.entity.system.Power; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.jetbrains.annotations.NotNull; + +import java.util.List; + +/** + *+ * Mapper 接口 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@Mapper +public interface PowerMapper extends BaseMapper+ * Mapper 接口 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@Mapper +public interface RoleMapper extends BaseMapper+ * Mapper 接口 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@Mapper +public interface RolePowerMapper extends BaseMapper+ * 路由和权限关系表 Mapper 接口 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@Mapper +public interface RouterPowerMapper extends BaseMapper+ * Mapper 接口 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@Mapper +public interface RouterRoleMapper extends BaseMapper+ * Mapper 接口 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@Mapper +public interface UserRoleMapper extends BaseMapper+ * 服务类 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +public interface PowerService extends IService+ * 服务类 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +public interface RolePowerService extends IService+ * 服务类 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +public interface RoleService extends IService+ * 路由和权限关系表 服务类 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +public interface RouterPowerService extends IService+ * 服务类 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +public interface RouterRoleService extends IService+ * 服务类 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +public interface UserRoleService extends IService+ * 服务实现类 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@Service +public class PowerServiceImpl extends ServiceImpl+ * 服务实现类 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@Service +public class RolePowerServiceImpl extends ServiceImpl+ * 服务实现类 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@Service +public class RoleServiceImpl extends ServiceImpl+ * 路由和权限关系表 服务实现类 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@Service +public class RouterPowerServiceImpl extends ServiceImpl+ * 服务实现类 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@Service +public class RouterRoleServiceImpl extends ServiceImpl+ * 服务实现类 + *
+ * + * @author Bunny + * @since 2024-09-26 + */ +@Service +public class UserRoleServiceImpl extends ServiceImpl