123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <?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.MkActivitiesCombinationPriceDao">
- <resultMap type="com.kmall.admin.entity.MkActivitiesCombinationPriceEntity" id="mkActivitiesCombinationPriceMap">
- <result property="macpId" column="macp_id"/>
- <result property="goodsSn" column="goods_sn"/>
- <result property="barcode" column="barcode"/>
- <result property="combinationNum" column="combination_num"/>
- <result property="combinedPrice" column="combined_price"/>
- <result property="combinationType" column="combination_type"/>
- <result property="mkaId" column="mka_id"/>
- <result property="deadline" column="deadline"/>
- <result property="createTime" column="create_time"/>
- <result property="createrSn" column="creater_sn"/>
- <result property="moderSn" column="moder_sn"/>
- <result property="updateTime" column="update_time"/>
- </resultMap>
- <select id="queryObject" resultType="com.kmall.admin.entity.MkActivitiesCombinationPriceEntity">
- select
- `macp_id`,
- `goods_sn`,
- `barcode`,
- `combination_num`,
- `combined_price`,
- `mka_id`,
- `deadline`,
- `create_time`,
- `creater_sn`,
- `moder_sn`,
- `update_time`
- from mk_activities_combination_price
- where macp_id = #{id}
- </select>
- <select id="queryList" resultType="com.kmall.admin.entity.MkActivitiesCombinationPriceEntity">
- select
- `macp_id`,
- `goods_sn`,
- `barcode`,
- `combination_num`,
- `combined_price`,
- `combination_type`,
- `mka_id`,
- `deadline`,
- `create_time`,
- `creater_sn`,
- `moder_sn`,
- `update_time`
- from mk_activities_combination_price
- WHERE 1=1
- <if test="storeId != null and storeId.trim() != ''">
- AND shop_sn = #{storeId}
- </if>
- <if test="mkaId != null">
- AND mka_id = #{mkaId}
- </if>
- <if test="name != null and name.trim() != ''">
- AND combination_type like concat ( '%' , #{name}, '%')
- </if>
- <choose>
- <when test="sidx != null and sidx.trim() != ''">
- order by ${sidx} ${order}
- </when>
- <otherwise>
- order by macp_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_activities_combination_price
- WHERE 1=1
- <if test="storeId != null and storeId.trim() != ''">
- AND shop_sn = #{storeId}
- </if>
- <if test="mkaId != null">
- AND mka_id = #{mkaId}
- </if>
- <if test="name != null and name.trim() != ''">
- AND combination_type like concat ( '%' , #{name}, '%')
- </if>
- </select>
- <insert id="save" parameterType="com.kmall.admin.entity.MkActivitiesCombinationPriceEntity" useGeneratedKeys="true" keyProperty="macpId">
- insert into mk_activities_combination_price(
- `goods_sn`,
- `barcode`,
- `combination_num`,
- `combined_price`,
- `combination_type`,
- `mka_id`,
- `deadline`,
- `create_time`,
- `creater_sn`,
- `moder_sn`,
- `update_time`)
- values(
- #{goodsSn},
- #{barcode},
- #{combinationNum},
- #{combinedPrice},
- #{combinationType},
- #{mkaId},
- #{deadline},
- #{createTime},
- #{createrSn},
- #{moderSn},
- #{updateTime})
- </insert>
- <insert id="saveBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id">
- insert into mk_activities_combination_price(
- `goods_sn`,
- `barcode`,
- `combination_num`,
- `combined_price`,
- `combination_type`,
- `mka_id`,
- `deadline`,
- `create_time`,
- `creater_sn`,
- `moder_sn`,
- `update_time`)
- values
- <foreach collection="list" index="index" item="item" separator=",">
- (
- #{item.goodsSn},
- #{item.barcode},
- #{item.combinationNum},
- #{item.combinedPrice},
- #{item.combinationType},
- #{item.mkaId},
- #{item.deadline},
- #{item.createTime},
- #{item.createrSn},
- #{item.moderSn},
- #{item.updateTime}
- )
- </foreach>
- </insert>
- <update id="update" parameterType="com.kmall.admin.entity.MkActivitiesCombinationPriceEntity">
- update mk_activities_combination_price
- <set>
- <if test="goodsSn != null">`goods_sn` = #{goodsSn}, </if>
- <if test="barcode != null">`barcode` = #{barcode}, </if>
- <if test="combinationNum != null">`combination_num` = #{combinationNum}, </if>
- <if test="combinedPrice != null">`combined_price` = #{combinedPrice}, </if>
- <if test="combinationType != null">`combination_type` = #{combinationType}, </if>
- <if test="mkaId != null">`mka_id` = #{mkaId}, </if>
- <if test="deadline != null">`deadline` = #{deadline}, </if>
- <if test="createTime != null">`create_time` = #{createTime}, </if>
- <if test="createrSn != null">`creater_sn` = #{createrSn}, </if>
- <if test="moderSn != null">`moder_sn` = #{moderSn}, </if>
- <if test="updateTime != null">`update_time` = #{updateTime}</if>
- </set>
- where macp_id = #{macpId}
- </update>
- <delete id="delete">
- delete from mk_activities_combination_price where macp_id = #{value}
- </delete>
- <delete id="deleteBatch">
- delete from mk_activities_combination_price where macp_id in
- <foreach item="macpId" collection="array" open="(" separator="," close=")">
- #{macpId}
- </foreach>
- </delete>
- </mapper>
|