|
@@ -0,0 +1,692 @@
|
|
|
|
|
+<?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.izouma.awesomeadmin.dao.GroupActivityMapper">
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.GroupActivity">
|
|
|
|
|
+ <!--generatedStart-->
|
|
|
|
|
+ <id column="id" property="id" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
|
|
|
|
|
+ <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="group_type" property="groupType" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="group_name" property="groupName" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="store_id" property="storeId" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="product_id" property="productId" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="sku_flag" property="skuFlag" jdbcType="CHAR"/>
|
|
|
|
|
+ <result column="sku_id" property="skuId" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="total_amount" property="totalAmount" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="current_amount" property="currentAmount" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="discount_price" property="discountPrice" jdbcType="DECIMAL"/>
|
|
|
|
|
+ <result column="original_price" property="originalPrice" jdbcType="DECIMAL"/>
|
|
|
|
|
+ <result column="group_number" property="groupNumber" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="group_days" property="groupDays" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="begin_time" property="beginTime" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result column="end_time" property="endTime" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result column="image" property="image" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="status_flag" property="statusFlag" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="remark" property="remark" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result column="rank" property="rank" jdbcType="INTEGER"/>
|
|
|
|
|
+ <!--generatedEnd-->
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
|
+ <!--generatedStart-->
|
|
|
|
|
+ id, del_flag, update_time, update_user, create_time, create_user, group_type, group_name, store_id, product_id, sku_flag, sku_id, total_amount, current_amount, discount_price, original_price, group_number, group_days, begin_time, end_time, image, status_flag, remark, rank <!--generatedEnd-->
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ FROM group_activity
|
|
|
|
|
+ WHERE id = #{id,jdbcType=INTEGER}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
|
|
+ DELETE
|
|
|
|
|
+ FROM group_activity
|
|
|
|
|
+ WHERE id = #{id,jdbcType=INTEGER}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+
|
|
|
|
|
+ <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.GroupActivity" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
+ INSERT INTO group_activity
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <!--generatedStart-->
|
|
|
|
|
+ <if test="id!= null">
|
|
|
|
|
+ id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="delFlag!= null">
|
|
|
|
|
+ del_flag,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime!= null">
|
|
|
|
|
+ update_time,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateUser!= null">
|
|
|
|
|
+ update_user,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime!= null">
|
|
|
|
|
+ create_time,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createUser!= null">
|
|
|
|
|
+ create_user,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupType!= null">
|
|
|
|
|
+ group_type,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupName!= null">
|
|
|
|
|
+ group_name,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="storeId!= null">
|
|
|
|
|
+ store_id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="productId!= null">
|
|
|
|
|
+ product_id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="skuFlag!= null">
|
|
|
|
|
+ sku_flag,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="skuId!= null">
|
|
|
|
|
+ sku_id,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="totalAmount!= null">
|
|
|
|
|
+ total_amount,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="currentAmount!= null">
|
|
|
|
|
+ current_amount,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="discountPrice!= null">
|
|
|
|
|
+ discount_price,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="originalPrice!= null">
|
|
|
|
|
+ original_price,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupNumber!= null">
|
|
|
|
|
+ group_number,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupDays!= null">
|
|
|
|
|
+ group_days,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="beginTime!= null">
|
|
|
|
|
+ begin_time,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime!= null">
|
|
|
|
|
+ end_time,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="image!= null">
|
|
|
|
|
+ image,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="statusFlag!= null">
|
|
|
|
|
+ status_flag,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="remark!= null">
|
|
|
|
|
+ remark,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rank!= null">
|
|
|
|
|
+ rank,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--generatedEnd-->
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <!--generatedStart-->
|
|
|
|
|
+ <if test="id != null">
|
|
|
|
|
+ #{id,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="delFlag != null">
|
|
|
|
|
+ #{delFlag,jdbcType=CHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateUser != null">
|
|
|
|
|
+ #{updateUser,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createUser != null">
|
|
|
|
|
+ #{createUser,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupType != null">
|
|
|
|
|
+ #{groupType,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupName != null">
|
|
|
|
|
+ #{groupName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="storeId != null">
|
|
|
|
|
+ #{storeId,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="productId != null">
|
|
|
|
|
+ #{productId,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="skuFlag != null">
|
|
|
|
|
+ #{skuFlag,jdbcType=CHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="skuId != null">
|
|
|
|
|
+ #{skuId,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="totalAmount != null">
|
|
|
|
|
+ #{totalAmount,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="currentAmount != null">
|
|
|
|
|
+ #{currentAmount,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="discountPrice != null">
|
|
|
|
|
+ #{discountPrice,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="originalPrice != null">
|
|
|
|
|
+ #{originalPrice,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupNumber != null">
|
|
|
|
|
+ #{groupNumber,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupDays != null">
|
|
|
|
|
+ #{groupDays,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="beginTime != null">
|
|
|
|
|
+ #{beginTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
|
+ #{endTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="image != null">
|
|
|
|
|
+ #{image,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="statusFlag != null">
|
|
|
|
|
+ #{statusFlag,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="remark != null">
|
|
|
|
|
+ #{remark,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rank != null">
|
|
|
|
|
+ #{rank,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--generatedEnd-->
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.GroupActivity">
|
|
|
|
|
+ UPDATE group_activity
|
|
|
|
|
+ <set>
|
|
|
|
|
+ <!--generatedStart-->
|
|
|
|
|
+ <if test="id != null">
|
|
|
|
|
+ id= #{id,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="delFlag != null">
|
|
|
|
|
+ del_flag= #{delFlag,jdbcType=CHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null">
|
|
|
|
|
+ update_time= #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateUser != null">
|
|
|
|
|
+ update_user= #{updateUser,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null">
|
|
|
|
|
+ create_time= #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createUser != null">
|
|
|
|
|
+ create_user= #{createUser,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupType != null">
|
|
|
|
|
+ group_type= #{groupType,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupName != null">
|
|
|
|
|
+ group_name= #{groupName,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="storeId != null">
|
|
|
|
|
+ store_id= #{storeId,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="productId != null">
|
|
|
|
|
+ product_id= #{productId,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="skuFlag != null">
|
|
|
|
|
+ sku_flag= #{skuFlag,jdbcType=CHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="skuId != null">
|
|
|
|
|
+ sku_id= #{skuId,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="totalAmount != null">
|
|
|
|
|
+ total_amount= #{totalAmount,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="currentAmount != null">
|
|
|
|
|
+ current_amount= #{currentAmount,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="discountPrice != null">
|
|
|
|
|
+ discount_price= #{discountPrice,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="originalPrice != null">
|
|
|
|
|
+ original_price= #{originalPrice,jdbcType=DECIMAL},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupNumber != null">
|
|
|
|
|
+ group_number= #{groupNumber,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupDays != null">
|
|
|
|
|
+ group_days= #{groupDays,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="beginTime != null">
|
|
|
|
|
+ begin_time= #{beginTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null">
|
|
|
|
|
+ end_time= #{endTime,jdbcType=TIMESTAMP},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="image != null">
|
|
|
|
|
+ image= #{image,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="statusFlag != null">
|
|
|
|
|
+ status_flag= #{statusFlag,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="remark != null">
|
|
|
|
|
+ remark= #{remark,jdbcType=VARCHAR},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rank != null">
|
|
|
|
|
+ rank= #{rank,jdbcType=INTEGER},
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--generatedEnd-->
|
|
|
|
|
+ </set>
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
|
|
+ id = #{id,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="idStr != null and !"".equals(idStr)">
|
|
|
|
|
+ id IN (${idStr})
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="queryGroupActivityByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GroupActivity">
|
|
|
|
|
+ SELECT <include refid="Base_Column_List"/> FROM group_activity
|
|
|
|
|
+ <where>
|
|
|
|
|
+ AND del_flag = 'N'
|
|
|
|
|
+ <if test="record.idStr != null and !"".equals(record.idStr)">
|
|
|
|
|
+ AND id IN (${record.idStr})
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--generatedStart-->
|
|
|
|
|
+ <if test="record.id != null and !"".equals(record.id)">
|
|
|
|
|
+ AND id = #{record.id}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.delFlag != null and !"".equals(record.delFlag)">
|
|
|
|
|
+ AND del_flag = #{record.delFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.updateTime != null and !"".equals(record.updateTime)">
|
|
|
|
|
+ AND update_time = #{record.updateTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.updateUser != null and !"".equals(record.updateUser)">
|
|
|
|
|
+ AND update_user = #{record.updateUser}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.createTime != null and !"".equals(record.createTime)">
|
|
|
|
|
+ AND create_time = #{record.createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.createUser != null and !"".equals(record.createUser)">
|
|
|
|
|
+ AND create_user = #{record.createUser}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.groupType != null and !"".equals(record.groupType)">
|
|
|
|
|
+ AND group_type = #{record.groupType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.groupName != null and !"".equals(record.groupName)">
|
|
|
|
|
+ AND group_name = #{record.groupName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.storeId != null and !"".equals(record.storeId)">
|
|
|
|
|
+ AND store_id = #{record.storeId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.productId != null and !"".equals(record.productId)">
|
|
|
|
|
+ AND product_id = #{record.productId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.skuFlag != null and !"".equals(record.skuFlag)">
|
|
|
|
|
+ AND sku_flag = #{record.skuFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.skuId != null and !"".equals(record.skuId)">
|
|
|
|
|
+ AND sku_id = #{record.skuId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.totalAmount != null and !"".equals(record.totalAmount)">
|
|
|
|
|
+ AND total_amount = #{record.totalAmount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.currentAmount != null and !"".equals(record.currentAmount)">
|
|
|
|
|
+ AND current_amount = #{record.currentAmount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.discountPrice != null and !"".equals(record.discountPrice)">
|
|
|
|
|
+ AND discount_price = #{record.discountPrice}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.originalPrice != null and !"".equals(record.originalPrice)">
|
|
|
|
|
+ AND original_price = #{record.originalPrice}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.groupNumber != null and !"".equals(record.groupNumber)">
|
|
|
|
|
+ AND group_number = #{record.groupNumber}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.groupDays != null and !"".equals(record.groupDays)">
|
|
|
|
|
+ AND group_days = #{record.groupDays}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.beginTime != null and !"".equals(record.beginTime)">
|
|
|
|
|
+ AND begin_time = #{record.beginTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.endTime != null and !"".equals(record.endTime)">
|
|
|
|
|
+ AND end_time = #{record.endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.image != null and !"".equals(record.image)">
|
|
|
|
|
+ AND image = #{record.image}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.statusFlag != null and !"".equals(record.statusFlag)">
|
|
|
|
|
+ AND status_flag = #{record.statusFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.remark != null and !"".equals(record.remark)">
|
|
|
|
|
+ AND remark = #{record.remark}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.rank != null and !"".equals(record.rank)">
|
|
|
|
|
+ AND rank = #{record.rank}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--generatedEnd-->
|
|
|
|
|
+ <if test="record.searchKey != null and !"".equals(record.searchKey)">
|
|
|
|
|
+ <trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
|
|
+ <!--generatedStart-->
|
|
|
|
|
+ OR group_type LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR group_name LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR store_id LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR product_id LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR sku_flag LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR sku_id LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR total_amount LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR current_amount LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR discount_price LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR original_price LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR group_number LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR group_days LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR begin_time LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR end_time LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR image LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR status_flag LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR remark LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ OR rank LIKE concat('%',#{record.searchKey},'%')
|
|
|
|
|
+ <!--generatedEnd-->
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ <if test="record.advancedQuery != null and !"".equals(record.advancedQuery)">
|
|
|
|
|
+ <foreach item="item" index="index" collection="record.advancedQuery.split('_;')">
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <when test="item.indexOf('like') != -1">
|
|
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
+ <if test="detailIndex == 3">
|
|
|
|
|
+ concat('%',#{itemDetail},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="detailIndex < 3">
|
|
|
|
|
+ ${itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
+ <if test="detailIndex == 3">
|
|
|
|
|
+ #{itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="detailIndex < 3">
|
|
|
|
|
+ ${itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ ORDER BY
|
|
|
|
|
+ <if test="record.orderByStr != null and !"".equals(record.orderByStr)">
|
|
|
|
|
+ <trim suffixOverrides=",">
|
|
|
|
|
+ <foreach item="item" index="index" separator="," collection="record.orderByStr.split('_;')">
|
|
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
+ ${itemDetail}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ ,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ id DESC
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="queryAllGroupActivity" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GroupActivity">
|
|
|
|
|
+ SELECT <include refid="Base_Column_List"/> FROM group_activity
|
|
|
|
|
+ <where>
|
|
|
|
|
+ AND del_flag = 'N'
|
|
|
|
|
+ <if test="idStr != null and !"".equals(idStr)">
|
|
|
|
|
+ AND id IN (${idStr})
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--generatedStart-->
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
|
|
+ AND id = #{id}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
|
|
+ AND del_flag = #{delFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
|
|
+ AND update_time = #{updateTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
|
|
+ AND update_user = #{updateUser}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null and !"".equals(createTime)">
|
|
|
|
|
+ AND create_time = #{createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createUser != null and !"".equals(createUser)">
|
|
|
|
|
+ AND create_user = #{createUser}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupType != null and !"".equals(groupType)">
|
|
|
|
|
+ AND group_type = #{groupType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupName != null and !"".equals(groupName)">
|
|
|
|
|
+ AND group_name = #{groupName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="storeId != null and !"".equals(storeId)">
|
|
|
|
|
+ AND store_id = #{storeId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="productId != null and !"".equals(productId)">
|
|
|
|
|
+ AND product_id = #{productId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="skuFlag != null and !"".equals(skuFlag)">
|
|
|
|
|
+ AND sku_flag = #{skuFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="skuId != null and !"".equals(skuId)">
|
|
|
|
|
+ AND sku_id = #{skuId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="totalAmount != null and !"".equals(totalAmount)">
|
|
|
|
|
+ AND total_amount = #{totalAmount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="currentAmount != null and !"".equals(currentAmount)">
|
|
|
|
|
+ AND current_amount = #{currentAmount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="discountPrice != null and !"".equals(discountPrice)">
|
|
|
|
|
+ AND discount_price = #{discountPrice}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="originalPrice != null and !"".equals(originalPrice)">
|
|
|
|
|
+ AND original_price = #{originalPrice}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupNumber != null and !"".equals(groupNumber)">
|
|
|
|
|
+ AND group_number = #{groupNumber}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupDays != null and !"".equals(groupDays)">
|
|
|
|
|
+ AND group_days = #{groupDays}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="beginTime != null and !"".equals(beginTime)">
|
|
|
|
|
+ AND begin_time = #{beginTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null and !"".equals(endTime)">
|
|
|
|
|
+ AND end_time = #{endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="image != null and !"".equals(image)">
|
|
|
|
|
+ AND image = #{image}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="statusFlag != null and !"".equals(statusFlag)">
|
|
|
|
|
+ AND status_flag = #{statusFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="remark != null and !"".equals(remark)">
|
|
|
|
|
+ AND remark = #{remark}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rank != null and !"".equals(rank)">
|
|
|
|
|
+ AND rank = #{rank}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--generatedEnd-->
|
|
|
|
|
+ <if test="searchKey != null and !"".equals(searchKey)">
|
|
|
|
|
+ <trim prefix="and (" suffix=")" prefixOverrides="OR">
|
|
|
|
|
+ <!--generatedStart-->
|
|
|
|
|
+ OR group_type LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR group_name LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR store_id LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR product_id LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR sku_flag LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR sku_id LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR total_amount LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR current_amount LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR discount_price LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR original_price LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR group_number LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR group_days LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR begin_time LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR end_time LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR image LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR status_flag LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR remark LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ OR rank LIKE concat('%',#{searchKey},'%')
|
|
|
|
|
+ <!--generatedEnd-->
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="advancedQuery != null and !"".equals(advancedQuery)">
|
|
|
|
|
+ <foreach item="item" index="index" collection="advancedQuery.split('_;')">
|
|
|
|
|
+ <choose>
|
|
|
|
|
+ <when test="item.indexOf('like') != -1">
|
|
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
+ <if test="detailIndex == 3">
|
|
|
|
|
+ concat('%',#{itemDetail},'%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="detailIndex < 3">
|
|
|
|
|
+ ${itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </when>
|
|
|
|
|
+ <otherwise>
|
|
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
+ <if test="detailIndex == 3">
|
|
|
|
|
+ #{itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="detailIndex < 3">
|
|
|
|
|
+ ${itemDetail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </otherwise>
|
|
|
|
|
+ </choose>
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ ORDER BY
|
|
|
|
|
+ <if test="orderByStr != null and !"".equals(orderByStr)">
|
|
|
|
|
+ <trim suffixOverrides=",">
|
|
|
|
|
+ <foreach item="item" index="index" separator="," collection="orderByStr.split('_;')">
|
|
|
|
|
+ <foreach item="itemDetail" index="detailIndex" collection="item.split('_,')">
|
|
|
|
|
+ ${itemDetail}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ ,
|
|
|
|
|
+ </if>
|
|
|
|
|
+ id DESC
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="queryGroupActivity" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GroupActivity">
|
|
|
|
|
+ SELECT <include refid="Base_Column_List"/> FROM group_activity
|
|
|
|
|
+ <where>
|
|
|
|
|
+ AND del_flag = 'N'
|
|
|
|
|
+ <!--generatedStart-->
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
|
|
+ AND id = #{id}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
|
|
+ AND del_flag = #{delFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateTime != null and !"".equals(updateTime)">
|
|
|
|
|
+ AND update_time = #{updateTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="updateUser != null and !"".equals(updateUser)">
|
|
|
|
|
+ AND update_user = #{updateUser}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null and !"".equals(createTime)">
|
|
|
|
|
+ AND create_time = #{createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createUser != null and !"".equals(createUser)">
|
|
|
|
|
+ AND create_user = #{createUser}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupType != null and !"".equals(groupType)">
|
|
|
|
|
+ AND group_type = #{groupType}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupName != null and !"".equals(groupName)">
|
|
|
|
|
+ AND group_name = #{groupName}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="storeId != null and !"".equals(storeId)">
|
|
|
|
|
+ AND store_id = #{storeId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="productId != null and !"".equals(productId)">
|
|
|
|
|
+ AND product_id = #{productId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="skuFlag != null and !"".equals(skuFlag)">
|
|
|
|
|
+ AND sku_flag = #{skuFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="skuId != null and !"".equals(skuId)">
|
|
|
|
|
+ AND sku_id = #{skuId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="totalAmount != null and !"".equals(totalAmount)">
|
|
|
|
|
+ AND total_amount = #{totalAmount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="currentAmount != null and !"".equals(currentAmount)">
|
|
|
|
|
+ AND current_amount = #{currentAmount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="discountPrice != null and !"".equals(discountPrice)">
|
|
|
|
|
+ AND discount_price = #{discountPrice}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="originalPrice != null and !"".equals(originalPrice)">
|
|
|
|
|
+ AND original_price = #{originalPrice}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupNumber != null and !"".equals(groupNumber)">
|
|
|
|
|
+ AND group_number = #{groupNumber}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="groupDays != null and !"".equals(groupDays)">
|
|
|
|
|
+ AND group_days = #{groupDays}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="beginTime != null and !"".equals(beginTime)">
|
|
|
|
|
+ AND begin_time = #{beginTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime != null and !"".equals(endTime)">
|
|
|
|
|
+ AND end_time = #{endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="image != null and !"".equals(image)">
|
|
|
|
|
+ AND image = #{image}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="statusFlag != null and !"".equals(statusFlag)">
|
|
|
|
|
+ AND status_flag = #{statusFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="remark != null and !"".equals(remark)">
|
|
|
|
|
+ AND remark = #{remark}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="rank != null and !"".equals(rank)">
|
|
|
|
|
+ AND rank = #{rank}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <!--generatedEnd-->
|
|
|
|
|
+ </where>
|
|
|
|
|
+ LIMIT 1
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="delete">
|
|
|
|
|
+ UPDATE group_activity SET del_flag = 'Y'
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
|
|
+ id = #{id,jdbcType=INTEGER}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="idStr != null and !"".equals(idStr)">
|
|
|
|
|
+ id IN (${idStr})
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GroupActivity">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ FROM group_activity
|
|
|
|
|
+ <where>
|
|
|
|
|
+ AND del_flag = 'N'
|
|
|
|
|
+ <!--generatedStart-->
|
|
|
|
|
+ <!--generatedEnd-->
|
|
|
|
|
+ </where>
|
|
|
|
|
+ ORDER BY id DESC
|
|
|
|
|
+ </select>
|
|
|
|
|
+</mapper>
|
|
|
|
|
+
|