123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- <?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.api.dao.mk.MkDistSellStatisMapper">
- <resultMap type="com.kmall.api.entity.mk.MkDistSellStatisVo" id="mkDistSellStatisMap">
- <result property="id" column="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="goodsId" column="goods_id"/>
- <result property="goodsPrice" column="goods_price"/>
- <result property="allocType" column="alloc_type"/>
- <result property="expendDistId" column="expend_dist_id"/>
- <result property="expendDistPrice" column="expend_dist_price"/>
- <result property="expendDistLevel" column="expend_dist_level"/>
- <result property="expendSource" column="expend_source"/>
- <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"/>
- <result property="orderSn" column="order_sn"/>
- </resultMap>
- <select id="queryObject" resultType="com.kmall.api.entity.mk.MkDistSellStatisVo">
- select
- `id`,
- `dist_flag`,
- `third_merch_sn`,
- `supplier_id`,
- `dist_id`,
- `goods_id`,
- `goods_price`,
- `alloc_type`,
- `expend_dist_id`,
- `expend_dist_price`,
- `expend_dist_level`,
- `expend_source`,
- `is_valid`,
- `note`,
- `creater_sn`,
- `create_time`,
- `moder_sn`,
- `mod_time`,
- `tstm`,order_sn
- from mk_dist_sell_statis
- where id = #{id}
- </select>
- <select id="queryList" resultType="com.kmall.api.entity.mk.MkDistSellStatisVo">
- select
- `id`,
- `dist_flag`,
- `third_merch_sn`,
- `supplier_id`,
- `dist_id`,
- `goods_id`,
- `goods_price`,
- `alloc_type`,
- `expend_dist_id`,
- `expend_dist_price`,
- `expend_dist_level`,
- `expend_source`,
- `is_valid`,
- `note`,
- `creater_sn`,
- `create_time`,
- `moder_sn`,
- `mod_time`,
- `tstm`,order_sn
- from mk_dist_sell_statis
- 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 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_statis
- WHERE 1=1
- <if test="name != null and name.trim() != ''">
- AND name LIKE concat('%',#{name},'%')
- </if>
- </select>
- <insert id="save" parameterType="com.kmall.api.entity.mk.MkDistSellStatisVo" useGeneratedKeys="true" keyProperty="id">
- insert into mk_dist_sell_statis(
- `dist_flag`,
- `third_merch_sn`,
- `supplier_id`,
- `dist_id`,
- order_sn,
- `goods_id`,
- `goods_price`,
- `alloc_type`,
- `expend_dist_id`,
- `expend_dist_price`,
- `expend_dist_level`,
- `expend_source`,
- `is_valid`,
- `note`,
- `creater_sn`,
- `create_time`,
- `moder_sn`,
- `mod_time`,
- `tstm`)
- values(
- #{distFlag},
- #{thirdMerchSn},
- #{supplierId},
- #{distId},
- #{orderSn},
- #{goodsId},
- #{goodsPrice},
- #{allocType},
- #{expendDistId},
- #{expendDistPrice},
- #{expendDistLevel},
- #{expendSource},
- #{isValid},
- #{note},
- #{createrSn},
- #{createTime},
- #{moderSn},
- #{modTime},
- #{tstm})
- </insert>
- <update id="update" parameterType="com.kmall.api.entity.mk.MkDistSellStatisVo">
- update mk_dist_sell_statis
- <set>
- <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="orderSn != null">`order_sn` = #{orderSn}, </if>
- <if test="goodsId != null">`goods_id` = #{goodsId}, </if>
- <if test="goodsPrice != null">`goods_price` = #{goodsPrice}, </if>
- <if test="allocType != null">`alloc_type` = #{allocType}, </if>
- <if test="expendDistId != null">`expend_dist_id` = #{expendDistId}, </if>
- <if test="expendDistPrice != null">`expend_dist_price` = #{expendDistPrice}, </if>
- <if test="expendDistLevel != null">`expend_dist_level` = #{expendDistLevel}, </if>
- <if test="expendSource != null">`expend_source` = #{expendSource}, </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 id = #{id}
- </update>
-
- <delete id="delete">
- delete from mk_dist_sell_statis where id = #{value}
- </delete>
-
- <delete id="deleteBatch">
- delete from mk_dist_sell_statis where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|