chengf
2025-08-18 c7ea3633e49e501c33f668fc08fab2ffc0e3c38c
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="menuUserV1ServiceDaoImpl">
 
    <!-- 保存自定义菜单信息 add by wuxw 2018-07-03 -->
    <insert id="saveMenuUserInfo" parameterType="Map">
        insert into m_menu_user(mu_id, name, icon, m_id, staff_id, url, seq)
        values (#{muId}, #{name}, #{icon}, #{mId}, #{staffId}, #{url}, #{seq})
    </insert>
 
    <!-- 查询自定义菜单信息 add by wuxw 2018-07-03 -->
    <select id="getMenuUserInfo" parameterType="Map" resultType="Map">
        select t.mu_id,t.mu_id muId,t.name,t.icon,t.m_id,t.m_id mId,t.status_cd,t.status_cd
        statusCd,t.staff_id,t.staff_id staffId,t.url,t.seq
        from m_menu_user t
        where 1 =1
        <if test="muId !=null and muId != ''">
            and t.mu_id= #{muId}
        </if>
        <if test="name !=null and name != ''">
            and t.name= #{name}
        </if>
        <if test="icon !=null and icon != ''">
            and t.icon= #{icon}
        </if>
        <if test="mId !=null and mId != ''">
            and t.m_id= #{mId}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="staffId !=null and staffId != ''">
            and t.staff_id= #{staffId}
        </if>
        <if test="url !=null and url != ''">
            and t.url= #{url}
        </if>
        <if test="seq !=null and seq != ''">
            and t.seq= #{seq}
        </if>
        order by t.seq
        <if test="page != -1 and page != null ">
            limit #{page}, #{row}
        </if>
    </select>
 
    <!-- 修改自定义菜单信息 add by wuxw 2018-07-03 -->
    <update id="updateMenuUserInfo" parameterType="Map">
        update m_menu_user t set t.status_cd = #{statusCd}
        <if test="newBId != null and newBId != ''">
            ,t.b_id = #{newBId}
        </if>
        <if test="name !=null and name != ''">
            , t.name= #{name}
        </if>
        <if test="icon !=null and icon != ''">
            , t.icon= #{icon}
        </if>
        <if test="mId !=null and mId != ''">
            , t.m_id= #{mId}
        </if>
        <if test="staffId !=null and staffId != ''">
            , t.staff_id= #{staffId}
        </if>
        <if test="url !=null and url != ''">
            , t.url= #{url}
        </if>
        <if test="seq !=null and seq != ''">
            , t.seq= #{seq}
        </if>
        where 1=1
        <if test="muId !=null and muId != ''">
            and t.mu_id= #{muId}
        </if>
    </update>
 
    <!-- 查询自定义菜单数量 add by wuxw 2018-07-03 -->
    <select id="queryMenuUsersCount" parameterType="Map" resultType="Map">
        select count(1) count
        from m_menu_user t
        where 1 =1
        <if test="muId !=null and muId != ''">
            and t.mu_id= #{muId}
        </if>
        <if test="name !=null and name != ''">
            and t.name= #{name}
        </if>
        <if test="icon !=null and icon != ''">
            and t.icon= #{icon}
        </if>
        <if test="mId !=null and mId != ''">
            and t.m_id= #{mId}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="staffId !=null and staffId != ''">
            and t.staff_id= #{staffId}
        </if>
        <if test="url !=null and url != ''">
            and t.url= #{url}
        </if>
        <if test="seq !=null and seq != ''">
            and t.seq= #{seq}
        </if>
    </select>
</mapper>