You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
5.9 KiB
99 lines
5.9 KiB
|
2 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="cc.hiver.mall.checkstock.mapper.CheckStockDetailMapper">
|
||
|
|
<resultMap id="BaseResultMap" type="cc.hiver.mall.checkstock.entity.CheckStockDetail">
|
||
|
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||
|
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||
|
|
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
|
||
|
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||
|
|
<result column="check_stock_id" jdbcType="VARCHAR" property="checkStockId" />
|
||
|
|
<result column="product_id" jdbcType="VARCHAR" property="productId" />
|
||
|
|
<result column="product_name" jdbcType="VARCHAR" property="productName" />
|
||
|
|
<result column="product_picture" jdbcType="VARCHAR" property="productPicture" />
|
||
|
|
<result column="product_sn" jdbcType="VARCHAR" property="productSn" />
|
||
|
|
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
|
||
|
|
<result column="attribute_list" jdbcType="VARCHAR" property="attributeList" />
|
||
|
|
<result column="pd_num" jdbcType="INTEGER" property="pdNum" />
|
||
|
|
<result column="change_count" jdbcType="INTEGER" property="changeCount" />
|
||
|
|
<result column="stock_count" jdbcType="INTEGER" property="stockCount" />
|
||
|
|
</resultMap>
|
||
|
|
<sql id="Example_Where_Clause">
|
||
|
|
<where>
|
||
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||
|
|
<if test="criteria.valid">
|
||
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||
|
|
<foreach collection="criteria.criteria" item="criterion">
|
||
|
|
<choose>
|
||
|
|
<when test="criterion.noValue">
|
||
|
|
and ${criterion.condition}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.singleValue">
|
||
|
|
and ${criterion.condition} #{criterion.value}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.betweenValue">
|
||
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.listValue">
|
||
|
|
and ${criterion.condition}
|
||
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||
|
|
separator=",">
|
||
|
|
#{listItem}
|
||
|
|
</foreach>
|
||
|
|
</when>
|
||
|
|
</choose>
|
||
|
|
</foreach>
|
||
|
|
</trim>
|
||
|
|
</if>
|
||
|
|
</foreach>
|
||
|
|
</where>
|
||
|
|
</sql>
|
||
|
|
<sql id="Update_By_Example_Where_Clause">
|
||
|
|
<where>
|
||
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||
|
|
<if test="criteria.valid">
|
||
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||
|
|
<foreach collection="criteria.criteria" item="criterion">
|
||
|
|
<choose>
|
||
|
|
<when test="criterion.noValue">
|
||
|
|
and ${criterion.condition}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.singleValue">
|
||
|
|
and ${criterion.condition} #{criterion.value}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.betweenValue">
|
||
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.listValue">
|
||
|
|
and ${criterion.condition}
|
||
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||
|
|
separator=",">
|
||
|
|
#{listItem}
|
||
|
|
</foreach>
|
||
|
|
</when>
|
||
|
|
</choose>
|
||
|
|
</foreach>
|
||
|
|
</trim>
|
||
|
|
</if>
|
||
|
|
</foreach>
|
||
|
|
</where>
|
||
|
|
</sql>
|
||
|
|
<sql id="Base_Column_List">
|
||
|
|
id, create_by, create_time, del_flag, update_by, update_time, check_stock_id, product_id, product_name,
|
||
|
|
product_picture, product_sn, shop_id, attribute_list, pd_num, change_count, stock_count
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<insert id="batchInsertCheckStock" parameterType="java.util.List">
|
||
|
|
insert into t_check_stock_detail (id, create_by, create_time, del_flag, update_by, update_time, check_stock_id, product_id, product_name,
|
||
|
|
product_picture, product_sn, shop_id, attribute_list, pd_num, change_count, stock_count)
|
||
|
|
values
|
||
|
|
<foreach collection="userList" item="user" separator=",">
|
||
|
|
(#{checkStockDetailList.id},#{checkStockDetailList.createBy},#{checkStockDetailList.createTime},#{checkStockDetailList.delFlag},
|
||
|
|
#{checkStockDetailList.updateBy},#{checkStockDetailList.updateTime},#{checkStockDetailList.checkStockId},#{checkStockDetailList.productId},#{checkStockDetailList.productName},
|
||
|
|
#{checkStockDetailList.productPicture},#{checkStockDetailList.productSn},#{checkStockDetailList.shopId},#{checkStockDetailList.attributeList},#{checkStockDetailList.pdNum},
|
||
|
|
#{checkStockDetailList.changeCount},#{checkStockDetailList.stockCount})
|
||
|
|
</foreach>
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
</mapper>
|