IT-KIMI_SHI\SINOIT.KIMI
2018-12-07 50eb1d766c470dc6ff927199eaee934f972a8b70
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package dao.mapper.authority;
 
import core.plugin.mybatis.annotation.MapperMaker;
import model.authority.User;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
import java.util.Map;
 
/**
 * @author CTPlayer
 * @since 2017/9/21 14:57
 */
@MapperMaker
public interface UserRealmMapper {
    User queryAsObject(String userName);
 
    /**
     * 查询所有的用户
     * @return
     */
    List<User> query();
 
    /**
     * 新增用户
     * @param user
     * @return
     */
    int insert(User user);
 
    /**
     * 更新用户
     * @param user
     * @return
     */
    int update(User user);
 
    /**
     * 分配权限
     * @param reporterId
     * @param privsResourceId
     * @param write
     * @param read
     * @return
     */
    int insertAuthority(@Param("reporterId")String reporterId, @Param("privsResourceId")String privsResourceId, @Param("read")int read, @Param("write")int write);
 
    int insertAuthorityForBatch(List<Map<String, Object>> list);
 
    List<User> queryByUserType(int userType);
 
    List<String> queryReporterIdByUser(User user);
 
    List<String> queryReporterIdByGroupId(@Param("groupId")String groupId);
 
    int updateAuthority(@Param("privsResourceId")String privsResourceId);
 
    int updateAuthorityForBatch(List<Map<String, Object>> list);
 
    List<String> queryReporterIdOfWriteByUser(@Param("userId")String userId);
 
    List<String> queryReporterIdOfWriteByGroup(@Param("groupId")String groupId);
 
 
    int deleteOneUser(User user);
}