Skip to content

Commit 1282dab

Browse files
committed
持续更新中
1 parent 5c2c417 commit 1282dab

14 files changed

+322
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package com.lmxdawn.admin.dao;
2+
3+
import com.lmxdawn.admin.entity.AuthPermission;
4+
import org.apache.ibatis.annotations.Mapper;
5+
6+
import java.util.List;
7+
import java.util.Map;
8+
9+
@Mapper
10+
public interface AuthPermissionDao {
11+
12+
/**
13+
* 根据roleIds查询
14+
* @param roleIds 传入的id
15+
* @return
16+
*/
17+
List<AuthPermission> findByRoleIdIn(List<Long> roleIds);
18+
19+
/**
20+
* 插入
21+
* @param authAdmin
22+
* @return
23+
*/
24+
boolean insert(AuthPermission authAdmin);
25+
26+
/**
27+
* 更新
28+
* @param authAdmin
29+
* @return
30+
*/
31+
boolean update(AuthPermission authAdmin);
32+
33+
/**
34+
* 删除
35+
* @param id
36+
* @return
37+
*/
38+
boolean delete(Long id);
39+
40+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.lmxdawn.admin.dao;
2+
3+
import com.lmxdawn.admin.entity.AuthPermissionRule;
4+
import org.apache.ibatis.annotations.Mapper;
5+
6+
import java.util.List;
7+
import java.util.Map;
8+
9+
@Mapper
10+
public interface AuthPermissionRuleDao {
11+
12+
/**
13+
* 查询列表
14+
* @return 列表
15+
*/
16+
List<AuthPermissionRule> findByPage(Map<String, Object> map);
17+
18+
/**
19+
* 根据id查询
20+
* @param id 传入的id
21+
* @return
22+
*/
23+
AuthPermissionRule findById(Long id);
24+
25+
/**
26+
* 插入
27+
* @param authAdmin
28+
* @return
29+
*/
30+
boolean insert(AuthPermissionRule authAdmin);
31+
32+
/**
33+
* 更新
34+
* @param authAdmin
35+
* @return
36+
*/
37+
boolean update(AuthPermissionRule authAdmin);
38+
39+
/**
40+
* 删除
41+
* @param id
42+
* @return
43+
*/
44+
boolean delete(Long id);
45+
46+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.lmxdawn.admin.dao;
2+
3+
import com.lmxdawn.admin.entity.AuthRoleAdmin;
4+
import org.apache.ibatis.annotations.Mapper;
5+
6+
import java.util.List;
7+
import java.util.Map;
8+
9+
@Mapper
10+
public interface AuthRoleAdminDao {
11+
12+
/**
13+
* 查询列表
14+
* @return 列表
15+
*/
16+
List<AuthRoleAdmin> findByPage(Map<String, Object> map);
17+
18+
/**
19+
* 根据 adminId 查询
20+
* @param adminId 传入的 adminId
21+
* @return
22+
*/
23+
AuthRoleAdmin findByAdminId(Long adminId);
24+
25+
/**
26+
* 插入
27+
* @param authAdmin
28+
* @return
29+
*/
30+
boolean insert(AuthRoleAdmin authAdmin);
31+
32+
/**
33+
* 更新
34+
* @param authAdmin
35+
* @return
36+
*/
37+
boolean update(AuthRoleAdmin authAdmin);
38+
39+
/**
40+
* 删除
41+
* @param id
42+
* @return
43+
*/
44+
boolean delete(Long id);
45+
46+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.lmxdawn.admin.dao;
2+
3+
import com.lmxdawn.admin.entity.AuthRole;
4+
import org.apache.ibatis.annotations.Mapper;
5+
6+
import java.util.List;
7+
import java.util.Map;
8+
9+
@Mapper
10+
public interface AuthRoleDao {
11+
12+
/**
13+
* 查询列表
14+
* @return 列表
15+
*/
16+
List<AuthRole> findByPage(Map<String, Object> map);
17+
18+
/**
19+
* 根据id查询
20+
* @param id 传入的id
21+
* @return
22+
*/
23+
AuthRole findById(Long id);
24+
25+
/**
26+
* 插入
27+
* @param authAdmin
28+
* @return
29+
*/
30+
boolean insert(AuthRole authAdmin);
31+
32+
/**
33+
* 更新
34+
* @param authAdmin
35+
* @return
36+
*/
37+
boolean update(AuthRole authAdmin);
38+
39+
/**
40+
* 删除
41+
* @param id
42+
* @return
43+
*/
44+
boolean delete(Long id);
45+
46+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.lmxdawn.admin.entity;
2+
3+
import lombok.Data;
4+
5+
/**
6+
* 权限授权表
7+
*/
8+
@Data
9+
public class AuthPermission {
10+
11+
private Long roleId;
12+
13+
private Long permissionRuleId;
14+
15+
private String type;
16+
17+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.lmxdawn.admin.entity;
2+
3+
import lombok.Data;
4+
5+
/**
6+
* 规则表
7+
*/
8+
@Data
9+
public class AuthPermissionRule {
10+
11+
private Long id;
12+
private Long pid;
13+
private String name;
14+
private String title;
15+
private Long status;
16+
private String condition;
17+
private Long listorder;
18+
private Long createTime;
19+
private Long updateTime;
20+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.lmxdawn.admin.entity;
2+
3+
import lombok.Data;
4+
5+
/**
6+
* 角色表
7+
*/
8+
@Data
9+
public class AuthRole {
10+
11+
private Long id;
12+
private String name;
13+
private Long pid;
14+
private Long status;
15+
private String remark;
16+
private Long createTime;
17+
private Long updateTime;
18+
private Long listorder;
19+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.lmxdawn.admin.entity;
2+
3+
import lombok.Data;
4+
5+
/**
6+
* 用户角色对应表
7+
*/
8+
@Data
9+
public class AuthRoleAdmin {
10+
11+
private long roleId;
12+
private long adminId;
13+
14+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.lmxdawn.admin.service;
2+
3+
4+
import com.lmxdawn.admin.entity.AuthPermission;
5+
6+
import java.util.List;
7+
8+
public interface AuthPermissionService {
9+
10+
11+
List<AuthPermission> findByRoleIdIn(List<Long> roleIds);
12+
13+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.lmxdawn.admin.service.impl;
2+
3+
import com.lmxdawn.admin.dao.AuthPermissionDao;
4+
import com.lmxdawn.admin.entity.AuthPermission;
5+
import com.lmxdawn.admin.service.AuthPermissionService;
6+
import org.springframework.beans.factory.annotation.Autowired;
7+
8+
import java.util.List;
9+
10+
public class AuthPermissionServiceImpl implements AuthPermissionService {
11+
12+
@Autowired
13+
private AuthPermissionDao authPermissionDao;
14+
15+
@Override
16+
public List<AuthPermission> findByRoleIdIn(List<Long> roleIds) {
17+
return authPermissionDao.findByRoleIdIn(roleIds);
18+
}
19+
}

0 commit comments

Comments
 (0)