You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
273 lines
12 KiB
XML
273 lines
12 KiB
XML
<?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.glxp.api.admin.dao.inventory.InvCountOrderDao">
|
|
<resultMap id="BaseResultMap" type="com.glxp.api.admin.entity.inventory.InvCountOrder">
|
|
<id column="id" jdbcType="INTEGER" property="id"/>
|
|
<result column="orderId" jdbcType="VARCHAR" property="orderId"/>
|
|
<result column="invStorageCode" jdbcType="VARCHAR" property="invStorageCode"/>
|
|
<result column="invWarehouseCode" jdbcType="VARCHAR" property="invWarehouseCode"/>
|
|
<result column="invSpaceCode" jdbcType="VARCHAR" property="invSpaceCode"/>
|
|
<result column="createUser" jdbcType="VARCHAR" property="createUser"/>
|
|
<result column="createTime" jdbcType="TIMESTAMP" property="createTime"/>
|
|
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
<result column="auditUser" jdbcType="VARCHAR" property="auditUser"/>
|
|
<result column="auditTime" jdbcType="TIMESTAMP" property="auditTime"/>
|
|
<result column="status" jdbcType="BOOLEAN" property="status"/>
|
|
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List">
|
|
id,
|
|
orderId,
|
|
invStorageCode,
|
|
invWarehouseCode,
|
|
invSpaceCode,
|
|
`createUser`,
|
|
createTime,
|
|
updateTime,
|
|
auditUser,
|
|
auditTime,
|
|
`status`,
|
|
remark
|
|
</sql>
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List"/>
|
|
from inv_count_order
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</select>
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
delete
|
|
from inv_count_order
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</delete>
|
|
|
|
<insert id="insert" parameterType="com.glxp.api.admin.entity.inventory.InvCountOrder">
|
|
insert into inv_count_order (id, orderId, invStorageCode,
|
|
invWarehouseCode, invSpaceCode, `createUser`,
|
|
createTime, updateTime, auditUser,
|
|
auditTime, `status`, remark)
|
|
values (#{id,jdbcType=INTEGER}, #{orderId,jdbcType=VARCHAR}, #{invStorageCode,jdbcType=VARCHAR},
|
|
#{invWarehouseCode,jdbcType=VARCHAR}, #{invSpaceCode,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
|
|
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{auditUser,jdbcType=VARCHAR},
|
|
#{auditTime,jdbcType=TIMESTAMP}, #{status,jdbcType=BOOLEAN}, #{remark,jdbcType=VARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.glxp.api.admin.entity.inventory.InvCountOrder">
|
|
<!--@mbg.generated-->
|
|
insert into inv_count_order
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="orderId != null">
|
|
orderId,
|
|
</if>
|
|
<if test="invStorageCode != null">
|
|
invStorageCode,
|
|
</if>
|
|
<if test="invWarehouseCode != null">
|
|
invWarehouseCode,
|
|
</if>
|
|
<if test="invSpaceCode != null">
|
|
invSpaceCode,
|
|
</if>
|
|
<if test="createUser != null">
|
|
`createUser`,
|
|
</if>
|
|
<if test="createTime != null">
|
|
createTime,
|
|
</if>
|
|
<if test="updateTime != null">
|
|
updateTime,
|
|
</if>
|
|
<if test="auditUser != null">
|
|
auditUser,
|
|
</if>
|
|
<if test="auditTime != null">
|
|
auditTime,
|
|
</if>
|
|
<if test="status != null">
|
|
`status`,
|
|
</if>
|
|
<if test="remark != null">
|
|
remark,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="orderId != null">
|
|
#{orderId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="invStorageCode != null">
|
|
#{invStorageCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="invWarehouseCode != null">
|
|
#{invWarehouseCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="invSpaceCode != null">
|
|
#{invSpaceCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createUser != null">
|
|
#{createUser,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createTime != null">
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="auditUser != null">
|
|
#{auditUser,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="auditTime != null">
|
|
#{auditTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="status != null">
|
|
#{status,jdbcType=BOOLEAN},
|
|
</if>
|
|
<if test="remark != null">
|
|
#{remark,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.api.admin.entity.inventory.InvCountOrder">
|
|
update inv_count_order
|
|
<set>
|
|
<if test="orderId != null">
|
|
orderId = #{orderId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="invStorageCode != null">
|
|
invStorageCode = #{invStorageCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="invWarehouseCode != null">
|
|
invWarehouseCode = #{invWarehouseCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="invSpaceCode != null">
|
|
invSpaceCode = #{invSpaceCode,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createUser != null">
|
|
`createUser` = #{createUser,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createTime != null">
|
|
createTime = #{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="auditUser != null">
|
|
auditUser = #{auditUser,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="auditTime != null">
|
|
auditTime = #{auditTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="status != null">
|
|
`status` = #{status,jdbcType=BOOLEAN},
|
|
</if>
|
|
<if test="remark != null">
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.glxp.api.admin.entity.inventory.InvCountOrder">
|
|
update inv_count_order
|
|
set orderId = #{orderId,jdbcType=VARCHAR},
|
|
invStorageCode = #{invStorageCode,jdbcType=VARCHAR},
|
|
invWarehouseCode = #{invWarehouseCode,jdbcType=VARCHAR},
|
|
invSpaceCode = #{invSpaceCode,jdbcType=VARCHAR},
|
|
`createUser` = #{createUser,jdbcType=VARCHAR},
|
|
createTime = #{createTime,jdbcType=TIMESTAMP},
|
|
updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
auditUser = #{auditUser,jdbcType=VARCHAR},
|
|
auditTime = #{auditTime,jdbcType=TIMESTAMP},
|
|
`status` = #{status,jdbcType=BOOLEAN},
|
|
remark = #{remark,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
|
|
<update id="updateBatch" parameterType="java.util.List">
|
|
update inv_count_order
|
|
<trim prefix="set" suffixOverrides=",">
|
|
<trim prefix="orderId = case" suffix="end,">
|
|
<foreach collection="list" index="index" item="item">
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.orderId,jdbcType=VARCHAR}
|
|
</foreach>
|
|
</trim>
|
|
<trim prefix="invStorageCode = case" suffix="end,">
|
|
<foreach collection="list" index="index" item="item">
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.invStorageCode,jdbcType=VARCHAR}
|
|
</foreach>
|
|
</trim>
|
|
<trim prefix="invWarehouseCode = case" suffix="end,">
|
|
<foreach collection="list" index="index" item="item">
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.invWarehouseCode,jdbcType=VARCHAR}
|
|
</foreach>
|
|
</trim>
|
|
<trim prefix="invSpaceCode = case" suffix="end,">
|
|
<foreach collection="list" index="index" item="item">
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.invSpaceCode,jdbcType=VARCHAR}
|
|
</foreach>
|
|
</trim>
|
|
<trim prefix="`createUser` = case" suffix="end,">
|
|
<foreach collection="list" index="index" item="item">
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.createUser,jdbcType=VARCHAR}
|
|
</foreach>
|
|
</trim>
|
|
<trim prefix="createTime = case" suffix="end,">
|
|
<foreach collection="list" index="index" item="item">
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
|
|
</foreach>
|
|
</trim>
|
|
<trim prefix="updateTime = case" suffix="end,">
|
|
<foreach collection="list" index="index" item="item">
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
</foreach>
|
|
</trim>
|
|
<trim prefix="auditUser = case" suffix="end,">
|
|
<foreach collection="list" index="index" item="item">
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.auditUser,jdbcType=VARCHAR}
|
|
</foreach>
|
|
</trim>
|
|
<trim prefix="auditTime = case" suffix="end,">
|
|
<foreach collection="list" index="index" item="item">
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.auditTime,jdbcType=TIMESTAMP}
|
|
</foreach>
|
|
</trim>
|
|
<trim prefix="`status` = case" suffix="end,">
|
|
<foreach collection="list" index="index" item="item">
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=BOOLEAN}
|
|
</foreach>
|
|
</trim>
|
|
<trim prefix="remark = case" suffix="end,">
|
|
<foreach collection="list" index="index" item="item">
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.remark,jdbcType=VARCHAR}
|
|
</foreach>
|
|
</trim>
|
|
</trim>
|
|
where id in
|
|
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
|
#{item.id,jdbcType=INTEGER}
|
|
</foreach>
|
|
</update>
|
|
|
|
<insert id="batchInsert" parameterType="map">
|
|
insert into inv_count_order
|
|
(id, orderId, invStorageCode, invWarehouseCode, invSpaceCode, `createUser`, createTime,
|
|
updateTime, auditUser, auditTime, `status`, remark)
|
|
values
|
|
<foreach collection="list" item="item" separator=",">
|
|
(#{item.id,jdbcType=INTEGER}, #{item.orderid,jdbcType=VARCHAR}, #{item.invstoragecode,jdbcType=VARCHAR},
|
|
#{item.invwarehousecode,jdbcType=VARCHAR}, #{item.invspacecode,jdbcType=VARCHAR},
|
|
#{item.createuser,jdbcType=VARCHAR}, #{item.createtime,jdbcType=TIMESTAMP},
|
|
#{item.updatetime,jdbcType=TIMESTAMP},
|
|
#{item.audituser,jdbcType=VARCHAR}, #{item.audittime,jdbcType=TIMESTAMP}, #{item.status,jdbcType=BOOLEAN},
|
|
#{item.remark,jdbcType=VARCHAR})
|
|
</foreach>
|
|
</insert>
|
|
</mapper> |