<?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.SoldNoStockInfoMapper" >
|
<resultMap id="BaseResultMap" type="com.gk.firework.Domain.SoldNoStockInfo" >
|
<!-- -->
|
<id column="id" property="id" jdbcType="BIGINT" />
|
<result column="directioncode" property="directioncode" jdbcType="VARCHAR" />
|
<result column="itemcode" property="itemcode" jdbcType="VARCHAR" />
|
<result column="itemname" property="itemname" jdbcType="VARCHAR" />
|
<result column="salestime" property="salestime" jdbcType="TIMESTAMP" />
|
<result column="salesperson" property="salesperson" jdbcType="VARCHAR" />
|
<result column="createdat" property="createdat" jdbcType="TIMESTAMP" />
|
<result column="createdby" property="createdby" jdbcType="VARCHAR" />
|
<result column="handler" property="handler" jdbcType="VARCHAR" />
|
<result column="handledat" property="handledat" jdbcType="TIMESTAMP" />
|
<result column="entryorder" property="entryorder" jdbcType="VARCHAR" />
|
<result column="flag" property="flag" jdbcType="TINYINT" />
|
<result column="content" property="content" jdbcType="VARCHAR" />
|
<result column="remark" property="remark" jdbcType="VARCHAR" />
|
<result column="companynumber" property="companynumber" jdbcType="VARCHAR" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
<!-- -->
|
id, directioncode, itemcode, itemname, salestime, salesperson, createdat, createdby,
|
handler, handledat, entryorder, flag, content, remark, companynumber
|
</sql>
|
<insert id="insertBatch">
|
insert into
|
soldnostock
|
<trim prefix="(" suffix=") values" suffixOverrides=",">
|
directioncode,
|
itemcode,
|
itemname,
|
salestime,
|
salesperson,
|
createdat,
|
createdby,
|
handler,
|
handledat,
|
entryorder,
|
flag,
|
content,
|
remark,
|
companynumber,
|
</trim>
|
<foreach collection="list" item="item" open="(" close=")" separator=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
#{item.directioncode},
|
#{item.itemcode},
|
#{item.itemname},
|
#{item.salestime},
|
#{item.salesperson},
|
#{item.createdat},
|
#{item.createdby},
|
#{item.handler},
|
#{item.handledat},
|
#{item.entryorder},
|
#{item.flag},
|
#{item.content},
|
#{item.remark},
|
#{item.companynumber},
|
</trim>
|
</foreach>
|
|
</insert>
|
|
<select id="selectSoldNoStockDataGrid" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List"/>
|
from soldnostock
|
<where>
|
1=1
|
and flag = 0
|
<if test="condition.directionCode != null and condition.directionCode != ''">
|
and directioncode = #{condition.directionCode}
|
</if>
|
<if test="condition.companyNumber != null and condition.companyNumber != ''">
|
and companynumber = #{condition.companyNumber}
|
</if>
|
</where>
|
|
</select>
|
<!--<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
<!– –>
|
select
|
<include refid="Base_Column_List" />
|
from soldnostock
|
where id = #{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
<!– –>
|
delete from soldnostock
|
where id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" parameterType="com.gk.firework.Domain.SoldNoStockInfo" >
|
<!– –>
|
insert into soldnostock (id, directioncode, itemcode,
|
itemname, salestime, salesperson,
|
createdat, createdby, handler,
|
handledat, entryorder, flag,
|
content, remark)
|
values (#{id,jdbcType=BIGINT}, #{directioncode,jdbcType=VARCHAR}, #{itemcode,jdbcType=VARCHAR},
|
#{itemname,jdbcType=VARCHAR}, #{salestime,jdbcType=TIMESTAMP}, #{salesperson,jdbcType=VARCHAR},
|
#{createdat,jdbcType=TIMESTAMP}, #{createdby,jdbcType=VARCHAR}, #{handler,jdbcType=VARCHAR},
|
#{handledat,jdbcType=TIMESTAMP}, #{entryorder,jdbcType=VARCHAR}, #{flag,jdbcType=TINYINT},
|
#{content,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR})
|
</insert>
|
<insert id="insertSelective" parameterType="com.gk.firework.Domain.SoldNoStockInfo" >
|
<!– –>
|
insert into soldnostock
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
id,
|
</if>
|
<if test="directioncode != null" >
|
directioncode,
|
</if>
|
<if test="itemcode != null" >
|
itemcode,
|
</if>
|
<if test="itemname != null" >
|
itemname,
|
</if>
|
<if test="salestime != null" >
|
salestime,
|
</if>
|
<if test="salesperson != null" >
|
salesperson,
|
</if>
|
<if test="createdat != null" >
|
createdat,
|
</if>
|
<if test="createdby != null" >
|
createdby,
|
</if>
|
<if test="handler != null" >
|
handler,
|
</if>
|
<if test="handledat != null" >
|
handledat,
|
</if>
|
<if test="entryorder != null" >
|
entryorder,
|
</if>
|
<if test="flag != null" >
|
flag,
|
</if>
|
<if test="content != null" >
|
content,
|
</if>
|
<if test="remark != null" >
|
remark,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
#{id,jdbcType=BIGINT},
|
</if>
|
<if test="directioncode != null" >
|
#{directioncode,jdbcType=VARCHAR},
|
</if>
|
<if test="itemcode != null" >
|
#{itemcode,jdbcType=VARCHAR},
|
</if>
|
<if test="itemname != null" >
|
#{itemname,jdbcType=VARCHAR},
|
</if>
|
<if test="salestime != null" >
|
#{salestime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="salesperson != null" >
|
#{salesperson,jdbcType=VARCHAR},
|
</if>
|
<if test="createdat != null" >
|
#{createdat,jdbcType=TIMESTAMP},
|
</if>
|
<if test="createdby != null" >
|
#{createdby,jdbcType=VARCHAR},
|
</if>
|
<if test="handler != null" >
|
#{handler,jdbcType=VARCHAR},
|
</if>
|
<if test="handledat != null" >
|
#{handledat,jdbcType=TIMESTAMP},
|
</if>
|
<if test="entryorder != null" >
|
#{entryorder,jdbcType=VARCHAR},
|
</if>
|
<if test="flag != null" >
|
#{flag,jdbcType=TINYINT},
|
</if>
|
<if test="content != null" >
|
#{content,jdbcType=VARCHAR},
|
</if>
|
<if test="remark != null" >
|
#{remark,jdbcType=VARCHAR},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.gk.firework.Domain.SoldNoStockInfo" >
|
<!– –>
|
update soldnostock
|
<set >
|
<if test="directioncode != null" >
|
directioncode = #{directioncode,jdbcType=VARCHAR},
|
</if>
|
<if test="itemcode != null" >
|
itemcode = #{itemcode,jdbcType=VARCHAR},
|
</if>
|
<if test="itemname != null" >
|
itemname = #{itemname,jdbcType=VARCHAR},
|
</if>
|
<if test="salestime != null" >
|
salestime = #{salestime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="salesperson != null" >
|
salesperson = #{salesperson,jdbcType=VARCHAR},
|
</if>
|
<if test="createdat != null" >
|
createdat = #{createdat,jdbcType=TIMESTAMP},
|
</if>
|
<if test="createdby != null" >
|
createdby = #{createdby,jdbcType=VARCHAR},
|
</if>
|
<if test="handler != null" >
|
handler = #{handler,jdbcType=VARCHAR},
|
</if>
|
<if test="handledat != null" >
|
handledat = #{handledat,jdbcType=TIMESTAMP},
|
</if>
|
<if test="entryorder != null" >
|
entryorder = #{entryorder,jdbcType=VARCHAR},
|
</if>
|
<if test="flag != null" >
|
flag = #{flag,jdbcType=TINYINT},
|
</if>
|
<if test="content != null" >
|
content = #{content,jdbcType=VARCHAR},
|
</if>
|
<if test="remark != null" >
|
remark = #{remark,jdbcType=VARCHAR},
|
</if>
|
</set>
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.gk.firework.Domain.SoldNoStockInfo" >
|
<!– –>
|
update soldnostock
|
set directioncode = #{directioncode,jdbcType=VARCHAR},
|
itemcode = #{itemcode,jdbcType=VARCHAR},
|
itemname = #{itemname,jdbcType=VARCHAR},
|
salestime = #{salestime,jdbcType=TIMESTAMP},
|
salesperson = #{salesperson,jdbcType=VARCHAR},
|
createdat = #{createdat,jdbcType=TIMESTAMP},
|
createdby = #{createdby,jdbcType=VARCHAR},
|
handler = #{handler,jdbcType=VARCHAR},
|
handledat = #{handledat,jdbcType=TIMESTAMP},
|
entryorder = #{entryorder,jdbcType=VARCHAR},
|
flag = #{flag,jdbcType=TINYINT},
|
content = #{content,jdbcType=VARCHAR},
|
remark = #{remark,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=BIGINT}
|
</update>-->
|
</mapper>
|