65 lines
2.5 KiB
XML
65 lines
2.5 KiB
XML
|
<?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="com.yanzhu.manage.mapper.WxMenuConfigRoleMapper">
|
||
|
|
||
|
<resultMap type="WxMenuConfigRole" id="WxMenuConfigRoleResult">
|
||
|
<result property="smcid" column="smcid" />
|
||
|
<result property="roleId" column="role_id" />
|
||
|
<result property="userId" column="user_id" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectWxMenuConfigRoleVo">
|
||
|
select smcid, role_id, user_id from wx_menu_config_role
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectWxMenuConfigRoleList" parameterType="WxMenuConfigRole" resultMap="WxMenuConfigRoleResult">
|
||
|
<include refid="selectWxMenuConfigRoleVo"/>
|
||
|
<where>
|
||
|
<if test="smcid != null "> and smcid = #{smcid}</if>
|
||
|
<if test="roleId != null "> and role_id = #{roleId}</if>
|
||
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectWxMenuConfigRoleBySmcid" parameterType="Long" resultMap="WxMenuConfigRoleResult">
|
||
|
<include refid="selectWxMenuConfigRoleVo"/>
|
||
|
where smcid = #{smcid}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertWxMenuConfigRole" parameterType="WxMenuConfigRole">
|
||
|
insert into wx_menu_config_role
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="smcid != null">smcid,</if>
|
||
|
<if test="roleId != null">role_id,</if>
|
||
|
<if test="userId != null">user_id,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="smcid != null">#{smcid},</if>
|
||
|
<if test="roleId != null">#{roleId},</if>
|
||
|
<if test="userId != null">#{userId},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateWxMenuConfigRole" parameterType="WxMenuConfigRole">
|
||
|
update wx_menu_config_role
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="roleId != null">role_id = #{roleId},</if>
|
||
|
<if test="userId != null">user_id = #{userId},</if>
|
||
|
</trim>
|
||
|
where smcid = #{smcid}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteWxMenuConfigRoleBySmcid" parameterType="Long">
|
||
|
delete from wx_menu_config_role where smcid = #{smcid}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteWxMenuConfigRoleBySmcids" parameterType="String">
|
||
|
delete from wx_menu_config_role where smcid in
|
||
|
<foreach item="smcid" collection="array" open="(" separator="," close=")">
|
||
|
#{smcid}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|