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.
136 lines
5.2 KiB
XML
136 lines
5.2 KiB
XML
3 years ago
|
<?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.sale.admin.dao.inventory.InvCountCodesMapper">
|
||
|
<resultMap id="BaseResultMap" type="com.glxp.sale.admin.entity.inventory.InvCountCodes">
|
||
|
<!--@mbg.generated-->
|
||
|
<!--@Table inv_count_codes-->
|
||
|
<id column="id" jdbcType="INTEGER" property="id" />
|
||
|
<result column="orderIdFk" jdbcType="VARCHAR" property="orderidfk" />
|
||
|
<result column="productId" jdbcType="VARCHAR" property="productid" />
|
||
|
<result column="code" jdbcType="VARCHAR" property="code" />
|
||
|
<result column="status" jdbcType="BOOLEAN" property="status" />
|
||
|
</resultMap>
|
||
|
<sql id="Base_Column_List">
|
||
|
<!--@mbg.generated-->
|
||
|
id, orderIdFk, productId, code, `status`
|
||
|
</sql>
|
||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||
|
<!--@mbg.generated-->
|
||
|
select
|
||
|
<include refid="Base_Column_List" />
|
||
|
from inv_count_codes
|
||
|
where id = #{id,jdbcType=INTEGER}
|
||
|
</select>
|
||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||
|
<!--@mbg.generated-->
|
||
|
delete from inv_count_codes
|
||
|
where id = #{id,jdbcType=INTEGER}
|
||
|
</delete>
|
||
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inventory.InvCountCodes" useGeneratedKeys="true">
|
||
|
<!--@mbg.generated-->
|
||
|
insert into inv_count_codes (orderIdFk, productId, code,
|
||
|
`status`)
|
||
|
values (#{orderidfk,jdbcType=VARCHAR}, #{productid,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
|
||
|
#{status,jdbcType=BOOLEAN})
|
||
|
</insert>
|
||
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.glxp.sale.admin.entity.inventory.InvCountCodes" useGeneratedKeys="true">
|
||
|
<!--@mbg.generated-->
|
||
|
insert into inv_count_codes
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="orderidfk != null">
|
||
|
orderIdFk,
|
||
|
</if>
|
||
|
<if test="productid != null">
|
||
|
productId,
|
||
|
</if>
|
||
|
<if test="code != null">
|
||
|
code,
|
||
|
</if>
|
||
|
<if test="status != null">
|
||
|
`status`,
|
||
|
</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="orderidfk != null">
|
||
|
#{orderidfk,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="productid != null">
|
||
|
#{productid,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="code != null">
|
||
|
#{code,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="status != null">
|
||
|
#{status,jdbcType=BOOLEAN},
|
||
|
</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.sale.admin.entity.inventory.InvCountCodes">
|
||
|
<!--@mbg.generated-->
|
||
|
update inv_count_codes
|
||
|
<set>
|
||
|
<if test="orderidfk != null">
|
||
|
orderIdFk = #{orderidfk,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="productid != null">
|
||
|
productId = #{productid,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="code != null">
|
||
|
code = #{code,jdbcType=VARCHAR},
|
||
|
</if>
|
||
|
<if test="status != null">
|
||
|
`status` = #{status,jdbcType=BOOLEAN},
|
||
|
</if>
|
||
|
</set>
|
||
|
where id = #{id,jdbcType=INTEGER}
|
||
|
</update>
|
||
|
<update id="updateByPrimaryKey" parameterType="com.glxp.sale.admin.entity.inventory.InvCountCodes">
|
||
|
<!--@mbg.generated-->
|
||
|
update inv_count_codes
|
||
|
set orderIdFk = #{orderidfk,jdbcType=VARCHAR},
|
||
|
productId = #{productid,jdbcType=VARCHAR},
|
||
|
code = #{code,jdbcType=VARCHAR},
|
||
|
`status` = #{status,jdbcType=BOOLEAN}
|
||
|
where id = #{id,jdbcType=INTEGER}
|
||
|
</update>
|
||
|
<update id="updateBatch" parameterType="java.util.List">
|
||
|
<!--@mbg.generated-->
|
||
|
update inv_count_codes
|
||
|
<trim prefix="set" suffixOverrides=",">
|
||
|
<trim prefix="orderIdFk = case" suffix="end,">
|
||
|
<foreach collection="list" index="index" item="item">
|
||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.orderidfk,jdbcType=VARCHAR}
|
||
|
</foreach>
|
||
|
</trim>
|
||
|
<trim prefix="productId = case" suffix="end,">
|
||
|
<foreach collection="list" index="index" item="item">
|
||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.productid,jdbcType=VARCHAR}
|
||
|
</foreach>
|
||
|
</trim>
|
||
|
<trim prefix="code = case" suffix="end,">
|
||
|
<foreach collection="list" index="index" item="item">
|
||
|
when id = #{item.id,jdbcType=INTEGER} then #{item.code,jdbcType=VARCHAR}
|
||
|
</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>
|
||
|
where id in
|
||
|
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||
|
#{item.id,jdbcType=INTEGER}
|
||
|
</foreach>
|
||
|
</update>
|
||
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||
|
<!--@mbg.generated-->
|
||
|
insert into inv_count_codes
|
||
|
(orderIdFk, productId, code, `status`)
|
||
|
values
|
||
|
<foreach collection="list" item="item" separator=",">
|
||
|
(#{item.orderidfk,jdbcType=VARCHAR}, #{item.productid,jdbcType=VARCHAR}, #{item.code,jdbcType=VARCHAR},
|
||
|
#{item.status,jdbcType=BOOLEAN})
|
||
|
</foreach>
|
||
|
</insert>
|
||
|
</mapper>
|