-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e50fbb
commit d23a018
Showing
11 changed files
with
141 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
blog/src/main/java/liuyuyang/net/mapper/RolePermissionMapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package liuyuyang.net.mapper; | ||
|
||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | ||
import liuyuyang.net.model.RolePermission; | ||
import org.apache.ibatis.annotations.Mapper; | ||
|
||
@Mapper | ||
public interface RolePermissionMapper extends BaseMapper<RolePermission> { | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
blog/src/main/java/liuyuyang/net/service/RolePermissionService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package liuyuyang.net.service; | ||
|
||
import com.baomidou.mybatisplus.extension.service.IService; | ||
import liuyuyang.net.model.RolePermission; | ||
|
||
public interface RolePermissionService extends IService<RolePermission> { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
blog/src/main/java/liuyuyang/net/service/impl/RolePermissionServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package liuyuyang.net.service.impl; | ||
|
||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||
import liuyuyang.net.mapper.RolePermissionMapper; | ||
import liuyuyang.net.model.RolePermission; | ||
import liuyuyang.net.service.RolePermissionService; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
@Service | ||
@Transactional | ||
public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionMapper, RolePermission> implements RolePermissionService { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
model/src/main/java/liuyuyang/net/dto/role/BindRouteAndPermission.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package liuyuyang.net.dto.role; | ||
|
||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
@Data | ||
public class BindRouteAndPermission { | ||
@ApiModelProperty(value = "路由id列表", example = "[1,2,3]", required = true) | ||
List<Integer> route_ids; | ||
@ApiModelProperty(value = "权限id列表", example = "[3,2,1]", required = true) | ||
List<Integer> permission_ids; | ||
} |
21 changes: 21 additions & 0 deletions
21
model/src/main/java/liuyuyang/net/model/RolePermission.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package liuyuyang.net.model; | ||
|
||
import com.baomidou.mybatisplus.annotation.IdType; | ||
import com.baomidou.mybatisplus.annotation.TableId; | ||
import com.baomidou.mybatisplus.annotation.TableName; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.Data; | ||
|
||
@Data | ||
@TableName("role_permission") | ||
public class RolePermission { | ||
@TableId(type = IdType.AUTO) | ||
@ApiModelProperty(value = "ID") | ||
private Integer id; | ||
|
||
@ApiModelProperty(value = "角色ID", example = "1", required = true) | ||
private Integer roleId; | ||
|
||
@ApiModelProperty(value = "权限ID", example = "1", required = true) | ||
private Integer permissionId; | ||
} |