|
|
|
@ -7,6 +7,7 @@
|
|
|
|
|
<result column="productId" jdbcType="VARCHAR" property="productId"/>
|
|
|
|
|
<result column="code" jdbcType="VARCHAR" property="code"/>
|
|
|
|
|
<result column="status" jdbcType="INTEGER" property="status"/>
|
|
|
|
|
<result column="batchNo" jdbcType="VARCHAR" property="batchNo"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
@ -14,7 +15,8 @@
|
|
|
|
|
orderIdFk,
|
|
|
|
|
productId,
|
|
|
|
|
code,
|
|
|
|
|
`status`
|
|
|
|
|
`status`,
|
|
|
|
|
batchNo
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
|
@ -33,9 +35,9 @@
|
|
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id"
|
|
|
|
|
parameterType="com.glxp.api.admin.entity.inventory.InvCountCodes" useGeneratedKeys="true">
|
|
|
|
|
insert into inv_count_codes (orderIdFk, productId, code,
|
|
|
|
|
`status`)
|
|
|
|
|
`status`, batchNo)
|
|
|
|
|
values (#{orderIdFk,jdbcType=VARCHAR}, #{productId,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
|
|
|
|
|
#{status,jdbcType=INTEGER})
|
|
|
|
|
#{status,jdbcType=INTEGER}, #{batchNo,jdbcType=VARCHAR})
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id"
|
|
|
|
@ -54,6 +56,9 @@
|
|
|
|
|
<if test="status != null">
|
|
|
|
|
`status`,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="batchNo != null and batchNo != ''">
|
|
|
|
|
batchNo,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="orderIdFk != null">
|
|
|
|
@ -68,6 +73,9 @@
|
|
|
|
|
<if test="status != null">
|
|
|
|
|
#{status,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="batchNo != null and batchNo != ''">
|
|
|
|
|
#{batchNo,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -86,6 +94,9 @@
|
|
|
|
|
<if test="status != null">
|
|
|
|
|
`status` = #{status,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="batchNo != null and batchNo != ''">
|
|
|
|
|
batchNo = #{batchNo,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
@ -95,7 +106,8 @@
|
|
|
|
|
set orderIdFk = #{orderIdFk,jdbcType=VARCHAR},
|
|
|
|
|
productId = #{productId,jdbcType=VARCHAR},
|
|
|
|
|
code = #{code,jdbcType=VARCHAR},
|
|
|
|
|
`status` = #{status,jdbcType=INTEGER}
|
|
|
|
|
`status` = #{status,jdbcType=INTEGER},
|
|
|
|
|
batchNo = #{batchNo,jdbcType=VARCHAR}
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
@ -122,6 +134,11 @@
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=INTEGER}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="batchNo = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.batchNo,jdbcType=VARCHAR}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
where id in
|
|
|
|
|
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
|
|
|
@ -131,11 +148,11 @@
|
|
|
|
|
|
|
|
|
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
|
|
|
|
insert into inv_count_codes
|
|
|
|
|
(orderIdFk, productId, code, `status`)
|
|
|
|
|
(orderIdFk, productId, code, `status`, batchNo)
|
|
|
|
|
values
|
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
|
(#{item.orderIdFk,jdbcType=VARCHAR}, #{item.productId,jdbcType=VARCHAR}, #{item.code,jdbcType=VARCHAR},
|
|
|
|
|
#{item.status,jdbcType=INTEGER})
|
|
|
|
|
#{item.status,jdbcType=INTEGER}, #{item.batchNo,jdbcType=VARCHAR})
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
@ -162,6 +179,9 @@
|
|
|
|
|
<if test="status != null">
|
|
|
|
|
AND status = #{status}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="batchNo != null and batchNo != ''">
|
|
|
|
|
AND batchNo = #{batchNo}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|