郑永安
2023-06-19 59e91a4e9ddaf23cebb12993c774aa899ab22d16
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
<?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.gk.firework.Mapper.ProductPriceInfoMapper" >
  <resultMap id="BaseResultMap" type="com.gk.firework.Domain.ProductPriceInfo" >
    <!--          -->
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="companynumber" property="companynumber" jdbcType="VARCHAR" />
    <result column="itemcode" property="itemcode" jdbcType="VARCHAR" />
    <result column="price" property="price" jdbcType="DECIMAL" />
    <result column="updated" property="updated" jdbcType="TIMESTAMP" />
    <result column="updator" property="updator" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--          -->
    id, companynumber, itemcode, price, updated, updator
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    <!--          -->
    select
    <include refid="Base_Column_List" />
    from productprice
    where id = #{id,jdbcType=BIGINT}
  </select>
  <select id="selectByCode" resultType="com.gk.firework.Domain.ProductPriceInfo">
    select
      *
    from productprice
    where companynumber = #{companynumber}
    and itemcode = #{directionCode}
  </select>
  <select id="selectByCodes" resultType="com.gk.firework.Domain.ProductPriceInfo">
    select
    *
    from productprice
    where companynumber = #{companynumber}
    and itemcode in
    <foreach collection="list" item="item" open="(" close=")">
      #{item}
    </foreach>
 
 
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    <!--          -->
    delete from productprice
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <update id="updateByPrimaryKeySelective" parameterType="com.gk.firework.Domain.ProductPriceInfo" >
    <!--          -->
    update productprice
    <set >
      <if test="companynumber != null" >
        companynumber = #{companynumber,jdbcType=VARCHAR},
      </if>
      <if test="itemcode != null" >
        itemcode = #{itemcode,jdbcType=VARCHAR},
      </if>
      <if test="price != null" >
        price = #{price,jdbcType=DECIMAL},
      </if>
      <if test="updated != null" >
        updated = #{updated,jdbcType=TIMESTAMP},
      </if>
      <if test="updator != null" >
        updator = #{updator,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.gk.firework.Domain.ProductPriceInfo" >
    <!--          -->
    update productprice
    set companynumber = #{companynumber,jdbcType=VARCHAR},
      itemcode = #{itemcode,jdbcType=VARCHAR},
      price = #{price,jdbcType=DECIMAL},
      updated = #{updated,jdbcType=TIMESTAMP},
      updator = #{updator,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>