|
@@ -0,0 +1,159 @@
|
|
|
|
+<?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.MkActivitiesPresentIntegralDao">
|
|
|
|
+
|
|
|
|
+ <resultMap type="com.kmall.admin.entity.mk.MkActivitiesPresentIntegralEntity" id="mkActivitiesPresentIntegralMap">
|
|
|
|
+ <result property="mapId" column="map_id"/>
|
|
|
|
+ <result property="productName" column="product_name"/>
|
|
|
|
+ <result property="activityGiveType" column="activity_give_type"/>
|
|
|
|
+ <result property="activityGiveNum" column="activity_give_num"/>
|
|
|
|
+ <result property="shopSn" column="shop_sn"/>
|
|
|
|
+ <result property="sku" column="sku"/>
|
|
|
|
+ <result property="barcode" column="barcode"/>
|
|
|
|
+ <result property="productBrand" column="product_brand"/>
|
|
|
|
+ <result property="productSeries" column="product_series"/>
|
|
|
|
+ <result property="mkaId" column="mka_id"/>
|
|
|
|
+ <result property="rejectScore" column="reject_score"/>
|
|
|
|
+ <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.mk.MkActivitiesPresentIntegralEntity">
|
|
|
|
+ select
|
|
|
|
+ `map_id`,
|
|
|
|
+ `product_name`,
|
|
|
|
+ `activity_give_type`,
|
|
|
|
+ `activity_give_num`,
|
|
|
|
+ `shop_sn`,
|
|
|
|
+ `sku`,
|
|
|
|
+ `barcode`,
|
|
|
|
+ `product_brand`,
|
|
|
|
+ `product_series`,
|
|
|
|
+ `mka_id`,
|
|
|
|
+ `reject_score`,
|
|
|
|
+ `deadline`,
|
|
|
|
+ `create_time`,
|
|
|
|
+ `creater_sn`,
|
|
|
|
+ `moder_sn`,
|
|
|
|
+ `update_time`
|
|
|
|
+ from mk_activities_present_integral
|
|
|
|
+ where map_id = #{id}
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="queryList" resultType="com.kmall.admin.entity.mk.MkActivitiesPresentIntegralEntity">
|
|
|
|
+ select
|
|
|
|
+ `map_id`,
|
|
|
|
+ `product_name`,
|
|
|
|
+ `activity_give_type`,
|
|
|
|
+ `activity_give_num`,
|
|
|
|
+ `shop_sn`,
|
|
|
|
+ `sku`,
|
|
|
|
+ `barcode`,
|
|
|
|
+ `product_brand`,
|
|
|
|
+ `product_series`,
|
|
|
|
+ `mka_id`,
|
|
|
|
+ `reject_score`,
|
|
|
|
+ `deadline`,
|
|
|
|
+ `create_time`,
|
|
|
|
+ `creater_sn`,
|
|
|
|
+ `moder_sn`,
|
|
|
|
+ `update_time`
|
|
|
|
+ from mk_activities_present_integral
|
|
|
|
+ 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 map_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_present_integral
|
|
|
|
+ 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.MkActivitiesPresentIntegralEntity" useGeneratedKeys="true" keyProperty="mapId">
|
|
|
|
+ insert into mk_activities_present_integral(
|
|
|
|
+ `product_name`,
|
|
|
|
+ `activity_give_type`,
|
|
|
|
+ `activity_give_num`,
|
|
|
|
+ `shop_sn`,
|
|
|
|
+ `sku`,
|
|
|
|
+ `barcode`,
|
|
|
|
+ `product_brand`,
|
|
|
|
+ `product_series`,
|
|
|
|
+ `mka_id`,
|
|
|
|
+ `reject_score`,
|
|
|
|
+ `deadline`,
|
|
|
|
+ `create_time`,
|
|
|
|
+ `creater_sn`,
|
|
|
|
+ `moder_sn`,
|
|
|
|
+ `update_time`)
|
|
|
|
+ values(
|
|
|
|
+ #{productName},
|
|
|
|
+ #{activityGiveType},
|
|
|
|
+ #{activityGiveNum},
|
|
|
|
+ #{shopSn},
|
|
|
|
+ #{sku},
|
|
|
|
+ #{barcode},
|
|
|
|
+ #{productBrand},
|
|
|
|
+ #{productSeries},
|
|
|
|
+ #{mkaId},
|
|
|
|
+ #{rejectScore},
|
|
|
|
+ #{deadline},
|
|
|
|
+ #{createTime},
|
|
|
|
+ #{createrSn},
|
|
|
|
+ #{moderSn},
|
|
|
|
+ #{updateTime})
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
|
|
+ <update id="update" parameterType="com.kmall.admin.entity.mk.MkActivitiesPresentIntegralEntity">
|
|
|
|
+ update mk_activities_present_integral
|
|
|
|
+ <set>
|
|
|
|
+ <if test="productName != null">`product_name` = #{productName}, </if>
|
|
|
|
+ <if test="activityGiveType != null">`activity_give_type` = #{activityGiveType}, </if>
|
|
|
|
+ <if test="activityGiveNum != null">`activity_give_num` = #{activityGiveNum}, </if>
|
|
|
|
+ <if test="shopSn != null">`shop_sn` = #{shopSn}, </if>
|
|
|
|
+ <if test="sku != null">`sku` = #{sku}, </if>
|
|
|
|
+ <if test="barcode != null">`barcode` = #{barcode}, </if>
|
|
|
|
+ <if test="productBrand != null">`product_brand` = #{productBrand}, </if>
|
|
|
|
+ <if test="productSeries != null">`product_series` = #{productSeries}, </if>
|
|
|
|
+ <if test="mkaId != null">`mka_id` = #{mkaId}, </if>
|
|
|
|
+ <if test="rejectScore != null">`reject_score` = #{rejectScore}, </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 map_id = #{mapId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
|
|
+ <delete id="delete">
|
|
|
|
+ delete from mk_activities_present_integral where map_id = #{value}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+ <delete id="deleteBatch">
|
|
|
|
+ delete from mk_activities_present_integral where map_id in
|
|
|
|
+ <foreach item="mapId" collection="array" open="(" separator="," close=")">
|
|
|
|
+ #{mapId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
|
|
+</mapper>
|