刘小明
2024-06-19 0d9f926ceac74c9fba899f4b76d113fd281579a5
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?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.dy.pmsGlobal.daoWo.WoRepairInfoMapper">
 
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoWo.WoRepairInfo">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="equipNo" column="equip_no" jdbcType="VARCHAR"/>
            <result property="fromNode" column="from_node" jdbcType="VARCHAR"/>
            <result property="repairReason" column="repair_reason" jdbcType="VARCHAR"/>
            <result property="toNode" column="to_node" jdbcType="VARCHAR"/>
            <result property="repairBy" column="repair_by" jdbcType="VARCHAR"/>
            <result property="repairTime" column="repair_time" jdbcType="TIMESTAMP"/>
            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
            <result property="createBy" column="create_by" jdbcType="BIGINT"/>
    </resultMap>
 
    <sql id="Base_Column_List">
        id,equip_no,from_node,
        repair_reason,to_node,repair_by,
        repair_time,create_time,create_by
    </sql>
 
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from wo_repair_info
        where  id = #{id,jdbcType=BIGINT} 
    </select>
 
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from wo_repair_info
        where  id = #{id,jdbcType=BIGINT} 
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoWo.WoRepairInfo" useGeneratedKeys="true">
        insert into wo_repair_info
        ( id,equip_no,from_node
        ,repair_reason,to_node,repair_by
        ,repair_time,create_time,create_by
        )
        values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{fromNode,jdbcType=VARCHAR}
        ,#{repairReason,jdbcType=VARCHAR},#{toNode,jdbcType=VARCHAR},#{repairBy,jdbcType=VARCHAR}
        ,#{repairTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{createBy,jdbcType=BIGINT}
        )
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoWo.WoRepairInfo" useGeneratedKeys="true">
        insert into wo_repair_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="equipNo != null">equip_no,</if>
                <if test="fromNode != null">from_node,</if>
                <if test="repairReason != null">repair_reason,</if>
                <if test="toNode != null">to_node,</if>
                <if test="repairBy != null">repair_by,</if>
                <if test="repairTime != null">repair_time,</if>
                <if test="createTime != null">create_time,</if>
                <if test="createBy != null">create_by,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="equipNo != null">#{equipNo,jdbcType=VARCHAR},</if>
                <if test="fromNode != null">#{fromNode,jdbcType=VARCHAR},</if>
                <if test="repairReason != null">#{repairReason,jdbcType=VARCHAR},</if>
                <if test="toNode != null">#{toNode,jdbcType=VARCHAR},</if>
                <if test="repairBy != null">#{repairBy,jdbcType=VARCHAR},</if>
                <if test="repairTime != null">#{repairTime,jdbcType=TIMESTAMP},</if>
                <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
                <if test="createBy != null">#{createBy,jdbcType=BIGINT},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoWo.WoRepairInfo">
        update wo_repair_info
        <set>
                <if test="equipNo != null">
                    equip_no = #{equipNo,jdbcType=VARCHAR},
                </if>
                <if test="fromNode != null">
                    from_node = #{fromNode,jdbcType=VARCHAR},
                </if>
                <if test="repairReason != null">
                    repair_reason = #{repairReason,jdbcType=VARCHAR},
                </if>
                <if test="toNode != null">
                    to_node = #{toNode,jdbcType=VARCHAR},
                </if>
                <if test="repairBy != null">
                    repair_by = #{repairBy,jdbcType=VARCHAR},
                </if>
                <if test="repairTime != null">
                    repair_time = #{repairTime,jdbcType=TIMESTAMP},
                </if>
                <if test="createTime != null">
                    create_time = #{createTime,jdbcType=TIMESTAMP},
                </if>
                <if test="createBy != null">
                    create_by = #{createBy,jdbcType=BIGINT},
                </if>
        </set>
        where   id = #{id,jdbcType=BIGINT} 
    </update>
    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoWo.WoRepairInfo">
        update wo_repair_info
        set 
            equip_no =  #{equipNo,jdbcType=VARCHAR},
            from_node =  #{fromNode,jdbcType=VARCHAR},
            repair_reason =  #{repairReason,jdbcType=VARCHAR},
            to_node =  #{toNode,jdbcType=VARCHAR},
            repair_by =  #{repairBy,jdbcType=VARCHAR},
            repair_time =  #{repairTime,jdbcType=TIMESTAMP},
            create_time =  #{createTime,jdbcType=TIMESTAMP},
            create_by =  #{createBy,jdbcType=BIGINT}
        where   id = #{id,jdbcType=BIGINT} 
    </update>
</mapper>