提交
This commit is contained in:
36
src/main/resources/mapper/SysRolesMenusMapper.xml
Normal file
36
src/main/resources/mapper/SysRolesMenusMapper.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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.chaozhanggui.system.cashierservice.dao.SysRolesMenusMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysRolesMenusKey">
|
||||
<id column="menu_id" jdbcType="BIGINT" property="menuId" />
|
||||
<id column="role_id" jdbcType="BIGINT" property="roleId" />
|
||||
</resultMap>
|
||||
<delete id="deleteByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysRolesMenusKey">
|
||||
delete from sys_roles_menus
|
||||
where menu_id = #{menuId,jdbcType=BIGINT}
|
||||
and role_id = #{roleId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysRolesMenusKey">
|
||||
insert into sys_roles_menus (menu_id, role_id)
|
||||
values (#{menuId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysRolesMenusKey">
|
||||
insert into sys_roles_menus
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="menuId != null">
|
||||
menu_id,
|
||||
</if>
|
||||
<if test="roleId != null">
|
||||
role_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="menuId != null">
|
||||
#{menuId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="roleId != null">
|
||||
#{roleId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user