提交
This commit is contained in:
36
src/main/resources/mapper/SysUsersJobsMapper.xml
Normal file
36
src/main/resources/mapper/SysUsersJobsMapper.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.SysUsersJobsMapper">
|
||||
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.SysUsersJobsKey">
|
||||
<id column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<id column="job_id" jdbcType="BIGINT" property="jobId" />
|
||||
</resultMap>
|
||||
<delete id="deleteByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.SysUsersJobsKey">
|
||||
delete from sys_users_jobs
|
||||
where user_id = #{userId,jdbcType=BIGINT}
|
||||
and job_id = #{jobId,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.SysUsersJobsKey">
|
||||
insert into sys_users_jobs (user_id, job_id)
|
||||
values (#{userId,jdbcType=BIGINT}, #{jobId,jdbcType=BIGINT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.SysUsersJobsKey">
|
||||
insert into sys_users_jobs
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="jobId != null">
|
||||
job_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="jobId != null">
|
||||
#{jobId,jdbcType=BIGINT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user