123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- <?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.kmall.admin.dao.mk.dist.MkDistSellAllocationHistoryDao">
- <resultMap type="com.kmall.admin.entity.mk.dist.MkDistSellAllocationHistoryEntity" id="mkDistSellAllocationHistoryMap">
- <result property="sellAllocHistoryId" column="sell_alloc_history_id"/>
- <result property="distChnlId" column="dist_chnl_id"/>
- <result property="distFlag" column="dist_flag"/>
- <result property="thirdMerchSn" column="third_merch_sn"/>
- <result property="supplierId" column="supplier_id"/>
- <result property="distId" column="dist_id"/>
- <result property="storeId" column="store_id"/>
- <result property="goodsId" column="goods_id"/>
- <result property="allocType" column="alloc_type"/>
- <result property="expendDistIds" column="expend_dist_ids"/>
- <result property="expendDistLines" column="expend_dist_lines"/>
- <result property="isValid" column="is_valid"/>
- <result property="note" column="note"/>
- <result property="createrSn" column="creater_sn"/>
- <result property="createTime" column="create_time"/>
- <result property="moderSn" column="moder_sn"/>
- <result property="modTime" column="mod_time"/>
- <result property="tstm" column="tstm"/>
- </resultMap>
- <select id="queryObject" resultType="com.kmall.admin.entity.mk.dist.MkDistSellAllocationHistoryEntity">
- select
- `sell_alloc_history_id`,
- `dist_chnl_id`,
- `dist_flag`,
- `third_merch_sn`,
- `supplier_id`,
- `dist_id`,
- `store_id`,
- `goods_id`,
- `alloc_type`,
- `expend_dist_ids`,
- `expend_dist_lines`,
- `is_valid`,
- `note`,
- `creater_sn`,
- `create_time`,
- `moder_sn`,
- `mod_time`,
- `tstm`
- from mk_dist_sell_allocation_history
- where sell_alloc_history_id = #{id}
- </select>
- <select id="queryList" resultType="com.kmall.admin.entity.mk.dist.MkDistSellAllocationHistoryEntity">
- select
- `sell_alloc_history_id`,
- `dist_chnl_id`,
- `dist_flag`,
- `third_merch_sn`,
- `supplier_id`,
- `dist_id`,
- `store_id`,
- `goods_id`,
- `alloc_type`,
- `expend_dist_ids`,
- `expend_dist_lines`,
- `is_valid`,
- `note`,
- `creater_sn`,
- `create_time`,
- `moder_sn`,
- `mod_time`,
- `tstm`
- from mk_dist_sell_allocation_history
- WHERE 1=1
- <if test="name != null and name.trim() != ''">
- AND name LIKE concat('%',#{name},'%')
- </if>
- <choose>
- <when test="sidx != null and sidx.trim() != ''">
- order by ${sidx} ${order}
- </when>
- <otherwise>
- order by sell_alloc_history_id desc
- </otherwise>
- </choose>
- <if test="offset != null and limit != null">
- limit #{offset}, #{limit}
- </if>
- </select>
-
- <select id="queryTotal" resultType="int">
- select count(*) from mk_dist_sell_allocation_history
- WHERE 1=1
- <if test="name != null and name.trim() != ''">
- AND name LIKE concat('%',#{name},'%')
- </if>
- </select>
-
- <insert id="save" parameterType="com.kmall.admin.entity.mk.dist.MkDistSellAllocationHistoryEntity" useGeneratedKeys="true" keyProperty="sellAllocHistoryId">
- insert into mk_dist_sell_allocation_history(
- `dist_chnl_id`,
- `dist_flag`,
- `third_merch_sn`,
- `supplier_id`,
- `dist_id`,
- `store_id`,
- `goods_id`,
- `alloc_type`,
- `expend_dist_ids`,
- `expend_dist_lines`,
- `is_valid`,
- `note`,
- `creater_sn`,
- `create_time`,
- `moder_sn`,
- `mod_time`,
- `tstm`)
- values(
- #{distChnlId},
- #{distFlag},
- #{thirdMerchSn},
- #{supplierId},
- #{distId},
- #{storeId},
- #{goodsId},
- #{allocType},
- #{expendDistIds},
- #{expendDistLines},
- #{isValid},
- #{note},
- #{createrSn},
- #{createTime},
- #{moderSn},
- #{modTime},
- #{tstm})
- </insert>
-
- <update id="update" parameterType="com.kmall.admin.entity.mk.dist.MkDistSellAllocationHistoryEntity">
- update mk_dist_sell_allocation_history
- <set>
- <if test="distChnlId != null">`dist_chnl_id` = #{distChnlId}, </if>
- <if test="distFlag != null">`dist_flag` = #{distFlag}, </if>
- <if test="thirdMerchSn != null">`third_merch_sn` = #{thirdMerchSn}, </if>
- <if test="supplierId != null">`supplier_id` = #{supplierId}, </if>
- <if test="distId != null">`dist_id` = #{distId}, </if>
- <if test="storeId != null">`store_id` = #{storeId}, </if>
- <if test="goodsId != null">`goods_id` = #{goodsId}, </if>
- <if test="allocType != null">`alloc_type` = #{allocType}, </if>
- <if test="expendDistIds != null">`expend_dist_ids` = #{expendDistIds}, </if>
- <if test="expendDistLines != null">`expend_dist_lines` = #{expendDistLines}, </if>
- <if test="isValid != null">`is_valid` = #{isValid}, </if>
- <if test="note != null">`note` = #{note}, </if>
- <if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
- <if test="createTime != null">`create_time` = #{createTime}, </if>
- <if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
- <if test="modTime != null">`mod_time` = #{modTime}, </if>
- <if test="tstm != null">`tstm` = #{tstm}</if>
- </set>
- where sell_alloc_history_id = #{sellAllocHistoryId}
- </update>
-
- <delete id="delete">
- delete from mk_dist_sell_allocation_history where sell_alloc_history_id = #{value}
- </delete>
-
- <delete id="deleteBatch">
- delete from mk_dist_sell_allocation_history where sell_alloc_history_id in
- <foreach item="sellAllocHistoryId" collection="array" open="(" separator="," close=")">
- #{sellAllocHistoryId}
- </foreach>
- </delete>
- </mapper>
|