13693261870
2025-07-02 6708810c4de34dfb9513061432d656f91d56ee3a
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
<?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.buss.mapper.DmDdConfigMapper">
    
    <resultMap type="DmDdConfig" id="DmDdConfigResult">
        <id property="PKID"    column="PKID"    />
        <result property="TYPE"    column="TYPE"    />
        <result property="UNIT"    column="UNIT"    />
        <result property="shipType"    column="SHIP_TYPE"    />
        <result property="TIME"    column="TIME"    />
    </resultMap>
 
    <sql id="selectDmDdConfigVo">
        select PKID, TYPE, UNIT, SHIP_TYPE, TIME from dm_dd_config
    </sql>
 
    <select id="selectDmDdConfigList" parameterType="DmDdConfig" resultMap="DmDdConfigResult">
        <include refid="selectDmDdConfigVo"/>
        <where>  
            <if test="PKID != null "> and PKID = #{PKID}</if>
            <if test="TYPE != null  and TYPE != ''"> and TYPE = #{TYPE}</if>
            <if test="UNIT != null  and UNIT != ''"> and UNIT = #{UNIT}</if>
            <if test="shipType != null  and shipType != ''"> and SHIP_TYPE = #{shipType}</if>
            <if test="TIME != null "> and TIME = #{TIME}</if>
        </where>
    </select>
    
    <select id="selectDmDdConfigByPKID" parameterType="Long" resultMap="DmDdConfigResult">
        <include refid="selectDmDdConfigVo"/>
        where PKID = #{PKID}
    </select>
 
    <insert id="insertDmDdConfig" parameterType="DmDdConfig">
        insert into dm_dd_config
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="TYPE != null">TYPE,</if>
            <if test="UNIT != null">UNIT,</if>
            <if test="shipType != null">SHIP_TYPE,</if>
            <if test="TIME != null">TIME,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="TYPE != null">#{TYPE},</if>
            <if test="UNIT != null">#{UNIT},</if>
            <if test="shipType != null">#{shipType},</if>
            <if test="TIME != null">#{TIME},</if>
         </trim>
    </insert>
 
    <update id="updateDmDdConfig" parameterType="DmDdConfig">
        update dm_dd_config
        <trim prefix="SET" suffixOverrides=",">
            <if test="TYPE != null">TYPE = #{TYPE},</if>
            <if test="UNIT != null">UNIT = #{UNIT},</if>
            <if test="shipType != null">SHIP_TYPE = #{shipType},</if>
            <if test="TIME != null">TIME = #{TIME},</if>
        </trim>
        where PKID = #{PKID}
    </update>
 
    <delete id="deleteDmDdConfigByPKID" parameterType="Long">
        delete from dm_dd_config where PKID = #{PKID}
    </delete>
 
    <delete id="deleteDmDdConfigByPKIDs" parameterType="String">
        delete from dm_dd_config where PKID in 
        <foreach item="PKID" collection="array" open="(" separator="," close=")">
            #{PKID}
        </foreach>
    </delete>
 
</mapper>