Blame view

src/main/java/com/huaheng/pc/system/menu/mapper/MenuMapper.java 3.08 KB
tangying authored
1
2
package com.huaheng.pc.system.menu.mapper;
3
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
tangying authored
4
5
6
7
8
9
10
11
12
13
14
15
import com.huaheng.pc.system.menu.domain.Menu;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 菜单表 数据层
 * 
 * @author huaheng
 */
@Service
16
public interface MenuMapper extends BaseMapper<Menu>
tangying authored
17
18
19
20
21
22
23
24
{

    /**
     * 根据用户ID查询PC菜单
     * 
     * @param userId 用户ID
     * @return 菜单列表
     */
25
    public List<Menu> selectPCMenusByUserId(@Param("warehouseCode") String warehouseCode, @Param("userId") Integer userId);
tangying authored
26
27
28
29
30
31


    public List<Menu> selectMenusByUserId(@Param("userId")Integer userId);
    /**
     * 根据用户ID查询权限
     * 
32
     * @param warehouseCode 仓库ID
tangying authored
33
34
35
     * @param userId 用户ID
     * @return 权限列表
     */
36
    public List<String> selectPermsByUserId(@Param("warehouseCode") String warehouseCode, @Param("userId") Integer userId);
tangying authored
37
38
39
40

    /**
     * 根据用户ID查询权限
     *
41
     * @param warehouseCode 仓库ID
tangying authored
42
43
     * @return 权限列表
     */
44
    public List<String> selectPermsBywarehouseCode(@Param("warehouseCode") String warehouseCode);
tangying authored
45
46
47
48
49
50
51

    /**
     * 根据角色ID查询菜单
     * 
     * @param roleId 角色ID
     * @return 菜单列表
     */
52
    public List<String> selectMenuTree(@Param("warehouseCode") String warehouseCode, @Param("roleId") Integer roleId);
tangying authored
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

    /**
     * 查询系统菜单列表
     * 
     * @param menu 菜单信息
     * @return 菜单列表
     */
    public List<Menu> selectMenuList(Menu menu);

    /**
     * 删除菜单管理信息
     * 
     * @param id 菜单ID
     * @return 结果
     */
68
    public int deleteMenuById(@Param("warehouseCode") String warehouseCode, @Param("id") Integer id);
tangying authored
69
70
71
72
73
74
75

    /**
     * 根据菜单ID查询信息
     * 
     * @param id 菜单ID
     * @return 菜单信息
     */
76
    public Menu selectMenuById(@Param("warehouseCode") String warehouseCode, @Param("id") Integer id);
tangying authored
77
78
79
80
81
82
83

    /**
     * 查询菜单数量
     * 
     * @param parentId 菜单父ID
     * @return 结果
     */
84
    Integer selectCountMenuByParentId(@Param("warehouseCode") String warehouseCode, @Param("parentId") Integer parentId);
tangying authored
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107

    /**
     * 新增菜单信息
     * 
     * @param menu 菜单信息
     * @return 结果
     */
    int insertMenu(Menu menu);

    /**
     * 修改菜单信息
     * 
     * @param menu 菜单信息
     * @return 结果
     */
    int updateMenu(Menu menu);

    /**
     * 校验菜单名称是否唯一
     * 
     * @param menuName 菜单名称
     * @return 结果
     */
108
    Menu checkMenuNameUnique(@Param("warehouseCode") String warehouseCode,
tangying authored
109
110
111
112
113
114
115
116
117
                             @Param("menuMobile") Boolean menuMobile,
                             @Param("menuName") String menuName);

    /**
     * 根据用户ID查询手机菜单
     *
     * @param userId 用户ID
     * @return 菜单列表
     */
118
    public List<Menu> selectMobileMenusByUserId(@Param("warehouseCode") String warehouseCode, @Param("userId") Integer userId);
tangying authored
119
120
121

    List<Menu> selectMenuPageList(Menu menu);
}