ROLEMapper.java
1.3 KB
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
package com.tianbo.warehouse.dao;
import com.tianbo.warehouse.model.ROLE;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface ROLEMapper {
    int deleteByPrimaryKey(Integer roleId);
    int insert(ROLE record);
    int insertSelective(ROLE record);
    ROLE selectByPrimaryKey(Integer roleId);
    List<ROLE> findRolesByUserId(Integer userId);
    List<ROLE> selectByParentId(Integer roleId);
    /**
     * 查询最顶层企业信息
     * @param roleId 组织机构ID
     * @return
     */
    List<ROLE> selectTopByChildID(Integer roleId);
    List<ROLE> findAll(@Param("roleName") String roleName,
                       @Param("type") String type);
    /**
     * 为findAll的sql优化版本
     * @param roleName
     * @param type
     * @return
     */
    List<ROLE> findAllWithChildAndTree(@Param("roleName") String roleName,
                                       @Param("type") String type);
    List<ROLE> findAllWithOutTree(@Param("roleName") String roleName,
                       @Param("type") String type);
    List<ROLE> orgSelectWithRootNoTree(ROLE record);
    int updateByPrimaryKeySelective(ROLE record);
    int updateByPrimaryKey(ROLE record);
    int updateTokenById(@Param("roleId") Integer roleId,
                        @Param("token") String token);
}