zhangnaisong
2024-07-24 675075c8e140ee0882c5277bd68468fe6194b207
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
<?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.ruoyi.sy.mapper.ArdTankWallLockTemporaryMapper">
    
    <resultMap type="ArdTankWallLockTemporary" id="ArdTankWallLockTemporaryResult">
        <result property="id"    column="id"    />
        <result property="wallId"    column="wall_id"    />
        <result property="lockId"    column="lock_id"    />
        <result property="processType"    column="process_type"    />
    </resultMap>
 
    <sql id="selectArdTankWallLockTemporaryVo">
        select id, wall_id, lock_id, process_type from ard_tank_wall_lock_temporary
    </sql>
 
    <select id="selectArdTankWallLockTemporaryList" parameterType="ArdTankWallLockTemporary" resultMap="ArdTankWallLockTemporaryResult">
        <include refid="selectArdTankWallLockTemporaryVo"/>
        <where>  
            <if test="wallId != null  and wallId != ''"> and wall_id = #{wallId}</if>
            <if test="lockId != null  and lockId != ''"> and lock_id = #{lockId}</if>
            <if test="processType != null  and processType != ''"> and process_type = #{processType}</if>
        </where>
    </select>
    
    <select id="selectArdTankWallLockTemporaryById" parameterType="String" resultMap="ArdTankWallLockTemporaryResult">
        <include refid="selectArdTankWallLockTemporaryVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertArdTankWallLockTemporary" parameterType="ArdTankWallLockTemporary">
        insert into ard_tank_wall_lock_temporary
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="wallId != null">wall_id,</if>
            <if test="lockId != null">lock_id,</if>
            <if test="processType != null">process_type,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="wallId != null">#{wallId},</if>
            <if test="lockId != null">#{lockId},</if>
            <if test="processType != null">#{processType},</if>
         </trim>
    </insert>
 
    <update id="updateArdTankWallLockTemporary" parameterType="ArdTankWallLockTemporary">
        update ard_tank_wall_lock_temporary
        <trim prefix="SET" suffixOverrides=",">
            <if test="wallId != null">wall_id = #{wallId},</if>
            <if test="lockId != null">lock_id = #{lockId},</if>
            <if test="processType != null">process_type = #{processType},</if>
        </trim>
        where id = #{id}
    </update>
 
    <delete id="deleteArdTankWallLockTemporaryById" parameterType="String">
        delete from ard_tank_wall_lock_temporary where id = #{id}
    </delete>
 
    <delete id="deleteArdTankWallLockTemporaryByIds" parameterType="String">
        delete from ard_tank_wall_lock_temporary where id in 
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
 
    <delete id="deleteArdTankWallLockTemporaryByLockId" parameterType="java.lang.String">
        delete from ard_tank_wall_lock_temporary where lock_id = #{lockId}
    </delete>
</mapper>