Fancy
2024-07-04 ddd56a8f37eb47d933a7064be9341feb8dbd8165
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
<?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.daoSta.StaWipSnExMapper">
 
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoSta.StaWipSnEx">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="deviceNo" column="device_no" jdbcType="VARCHAR"/>
            <result property="productId" column="product_id" jdbcType="BIGINT"/>
            <result property="productName" column="product_name" jdbcType="VARCHAR"/>
            <result property="productNo" column="product_no" jdbcType="VARCHAR"/>
            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
            <result property="createBy" column="create_by" jdbcType="BIGINT"/>
    </resultMap>
 
    <sql id="Base_Column_List">
        id,device_no,product_id,
        product_name,product_no,create_time,
        create_by
    </sql>
 
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from sta_wip_sn_ex
        where  id = #{id,jdbcType=BIGINT} 
    </select>
 
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from sta_wip_sn_ex
        where  id = #{id,jdbcType=BIGINT} 
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaWipSnEx" useGeneratedKeys="true">
        insert into sta_wip_sn_ex
        ( id,device_no,product_id
        ,product_name,product_no,create_time
        ,create_by)
        values (#{id,jdbcType=BIGINT},#{deviceNo,jdbcType=VARCHAR},#{productId,jdbcType=BIGINT}
        ,#{productName,jdbcType=VARCHAR},#{productNo,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP}
        ,#{createBy,jdbcType=BIGINT})
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaWipSnEx" useGeneratedKeys="true">
        insert into sta_wip_sn_ex
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="deviceNo != null">device_no,</if>
                <if test="productId != null">product_id,</if>
                <if test="productName != null">product_name,</if>
                <if test="productNo != null">product_no,</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="deviceNo != null">#{deviceNo,jdbcType=VARCHAR},</if>
                <if test="productId != null">#{productId,jdbcType=BIGINT},</if>
                <if test="productName != null">#{productName,jdbcType=VARCHAR},</if>
                <if test="productNo != null">#{productNo,jdbcType=VARCHAR},</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.pojoSta.StaWipSnEx">
        update sta_wip_sn_ex
        <set>
                <if test="deviceNo != null">
                    device_no = #{deviceNo,jdbcType=VARCHAR},
                </if>
                <if test="productId != null">
                    product_id = #{productId,jdbcType=BIGINT},
                </if>
                <if test="productName != null">
                    product_name = #{productName,jdbcType=VARCHAR},
                </if>
                <if test="productNo != null">
                    product_no = #{productNo,jdbcType=VARCHAR},
                </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.pojoSta.StaWipSnEx">
        update sta_wip_sn_ex
        set 
            device_no =  #{deviceNo,jdbcType=VARCHAR},
            product_id =  #{productId,jdbcType=BIGINT},
            product_name =  #{productName,jdbcType=VARCHAR},
            product_no =  #{productNo,jdbcType=VARCHAR},
            create_time =  #{createTime,jdbcType=TIMESTAMP},
            create_by =  #{createBy,jdbcType=BIGINT}
        where   id = #{id,jdbcType=BIGINT} 
    </update>
</mapper>