From 59e91a4e9ddaf23cebb12993c774aa899ab22d16 Mon Sep 17 00:00:00 2001
From: 郑永安 <zyazyz250@sina.com>
Date: 星期一, 19 六月 2023 14:22:45 +0800
Subject: [PATCH] 描述

---
 src/main/java/com/gk/firework/Mapper/mybatis/ProductCodeInfoMapper.xml |  206 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 206 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/gk/firework/Mapper/mybatis/ProductCodeInfoMapper.xml b/src/main/java/com/gk/firework/Mapper/mybatis/ProductCodeInfoMapper.xml
new file mode 100644
index 0000000..4f9dc80
--- /dev/null
+++ b/src/main/java/com/gk/firework/Mapper/mybatis/ProductCodeInfoMapper.xml
@@ -0,0 +1,206 @@
+<?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.ProductCodeInfoMapper" >
+  <resultMap id="BaseResultMap" type="com.gk.firework.Domain.ProductCodeInfo" >
+    <!--          -->
+    <id column="id" property="id" jdbcType="BIGINT" />
+    <result column="ordercode" property="ordercode" jdbcType="VARCHAR" />
+    <result column="originalcode" property="originalcode" jdbcType="VARCHAR" />
+    <result column="itemname" property="itemname" jdbcType="VARCHAR" />
+    <result column="manufacturer" property="manufacturer" jdbcType="VARCHAR" />
+    <result column="explosivecontent" property="explosivecontent" jdbcType="VARCHAR" />
+    <result column="boxnumber" property="boxnumber" jdbcType="INTEGER" />
+    <result column="type" property="type" jdbcType="VARCHAR" />
+    <result column="level" property="level" jdbcType="VARCHAR" />
+    <result column="createdby" property="createdby" jdbcType="VARCHAR" />
+    <result column="createddate" property="createddate" jdbcType="TIMESTAMP" />
+    <result column="price" property="price" jdbcType="DECIMAL" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    <!--          -->
+    id, ordercode, originalcode, itemname, manufacturer, explosivecontent, boxnumber,
+    type, level,createdby, createddate,price
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    <!--          -->
+    select
+    <include refid="Base_Column_List" />
+    from productcode
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <select id="selectByFourteen" resultType="com.gk.firework.Domain.ProductCodeInfo">
+    select
+    <include refid="Base_Column_List" />
+    from productcode
+    where
+    originalcode like concat(#{fourteen},'%')
+    and createddate &gt;= #{date}
+    order by createddate desc
+    limit 1
+  </select>
+  <select id="selectByOrderCode" resultType="com.gk.firework.Domain.ProductCodeInfo">
+    select
+    <include refid="Base_Column_List" />
+    from productcode
+    where ordercode = #{ordercode}
+    and isdel = 0
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    <!--          -->
+    delete from productcode
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.gk.firework.Domain.ProductCodeInfo" >
+    <!--          -->
+    insert into productcode (id, ordercode, originalcode,
+      itemname, manufacturer, explosivecontent,
+      boxnumber,type, level, createdby, createddate,price,isdel
+      )
+    values (#{id,jdbcType=BIGINT}, #{ordercode,jdbcType=VARCHAR}, #{originalcode,jdbcType=VARCHAR},
+      #{itemname,jdbcType=VARCHAR}, #{manufacturer,jdbcType=VARCHAR}, #{explosivecontent,jdbcType=VARCHAR},
+      #{boxnumber,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR},#{level,jdbcType=VARCHAR},
+    #{createdby,jdbcType=VARCHAR}, #{createddate,jdbcType=TIMESTAMP}, #{price,jdbcType=DECIMAL},0
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.gk.firework.Domain.ProductCodeInfo">
+    <!--          -->
+    insert into productcode
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        id,
+      </if>
+      <if test="ordercode != null" >
+        ordercode,
+      </if>
+      <if test="originalcode != null" >
+        originalcode,
+      </if>
+      <if test="itemname != null" >
+        itemname,
+      </if>
+      <if test="manufacturer != null" >
+        manufacturer,
+      </if>
+      <if test="explosivecontent != null" >
+        explosivecontent,
+      </if>
+      <if test="boxnumber != null" >
+        boxnumber,
+      </if>
+      <if test="type != null">
+        type,
+      </if>
+      <if test="level != null">
+        level,
+      </if>
+      <if test="createdby != null" >
+        createdby,
+      </if>
+      <if test="createddate != null" >
+        createddate,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="id != null" >
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="ordercode != null" >
+        #{ordercode,jdbcType=VARCHAR},
+      </if>
+      <if test="originalcode != null" >
+        #{originalcode,jdbcType=VARCHAR},
+      </if>
+      <if test="itemname != null" >
+        #{itemname,jdbcType=VARCHAR},
+      </if>
+      <if test="manufacturer != null" >
+        #{manufacturer,jdbcType=VARCHAR},
+      </if>
+      <if test="explosivecontent != null" >
+        #{explosivecontent,jdbcType=VARCHAR},
+      </if>
+      <if test="boxnumber != null" >
+        #{boxnumber,jdbcType=INTEGER},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=VARCHAR},
+      </if>
+      <if test="level != null">
+        #{level,jdbcType=VARCHAR},
+      </if>
+      <if test="createdby != null" >
+        #{createdby,jdbcType=VARCHAR},
+      </if>
+      <if test="createddate != null" >
+        #{createddate,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <insert id="insertBatch" parameterType="java.util.List">
+    insert into productcode(id, ordercode, originalcode,
+      itemname, manufacturer, explosivecontent,
+      boxnumber,type, level, createdby,createddate,price,isdel
+      )
+    values
+    <foreach collection="list" item="item" index="index" separator=",">
+      (#{item.id,jdbcType=BIGINT}, #{item.ordercode,jdbcType=VARCHAR}, #{item.originalcode,jdbcType=VARCHAR},
+      #{item.itemname,jdbcType=VARCHAR}, #{item.manufacturer,jdbcType=VARCHAR}, #{item.explosivecontent,jdbcType=VARCHAR},
+      #{item.boxnumber,jdbcType=INTEGER}, #{item.type,jdbcType=VARCHAR},#{item.level,jdbcType=VARCHAR},
+      #{item.createdby,jdbcType=VARCHAR}, #{item.createddate,jdbcType=TIMESTAMP},
+      #{item.price,jdbcType=DECIMAL},0
+      )
+    </foreach>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gk.firework.Domain.ProductCodeInfo" >
+    <!--          -->
+    update productcode
+    <set >
+      <if test="ordercode != null" >
+        ordercode = #{ordercode,jdbcType=VARCHAR},
+      </if>
+      <if test="originalcode != null" >
+        originalcode = #{originalcode,jdbcType=VARCHAR},
+      </if>
+      <if test="itemname != null" >
+        itemname = #{itemname,jdbcType=VARCHAR},
+      </if>
+      <if test="manufacturer != null" >
+        manufacturer = #{manufacturer,jdbcType=VARCHAR},
+      </if>
+      <if test="explosivecontent != null" >
+        explosivecontent = #{explosivecontent,jdbcType=VARCHAR},
+      </if>
+      <if test="boxnumber != null" >
+        boxnumber = #{boxnumber,jdbcType=INTEGER},
+      </if>
+      <if test="type != null">
+        type = #{type,jdbcType=VARCHAR},
+      </if>
+      <if test="level != null">
+        level = #{level,jdbcType=VARCHAR},
+      </if>
+      <if test="createdby != null" >
+        createdby = #{createdby,jdbcType=VARCHAR},
+      </if>
+      <if test="createddate != null" >
+        createddate = #{createddate,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gk.firework.Domain.ProductCodeInfo" >
+    <!--          -->
+    update productcode
+    set ordercode = #{ordercode,jdbcType=VARCHAR},
+      originalcode = #{originalcode,jdbcType=VARCHAR},
+      itemname = #{itemname,jdbcType=VARCHAR},
+      manufacturer = #{manufacturer,jdbcType=VARCHAR},
+      explosivecontent = #{explosivecontent,jdbcType=VARCHAR},
+      boxnumber = #{boxnumber,jdbcType=INTEGER},
+      type = #{type,jdbcType=VARCHAR},
+      level = #{level,jdbcType=VARCHAR},
+      createdby = #{createdby,jdbcType=VARCHAR},
+      createddate = #{createddate,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

--
Gitblit v1.9.2