| | |
| | | <?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.ks.lucky.mapper.LuckyActivityMapper"> |
| | | <resultMap id="BaseResultMap" type="com.ks.lucky.pojo.DO.LuckyActivity"> |
| | | <id column="id" jdbcType="BIGINT" property="id"/> |
| | |
| | | <result column="current_person_count" jdbcType="INTEGER" property="currentPersonCount"/> |
| | | <result column="state" jdbcType="INTEGER" property="state"/> |
| | | <result column="state_remarks" jdbcType="VARCHAR" property="stateRemarks"/> |
| | | <result column="start_time" jdbcType="TIMESTAMP" property="startTime"/> |
| | | <result column="pre_finish_time" jdbcType="TIMESTAMP" property="preFinishTime"/> |
| | | <result column="actual_finish_time" jdbcType="TIMESTAMP" property="actualFinishTime"/> |
| | | <result column="pre_open_time" jdbcType="TIMESTAMP" property="preOpenTime"/> |
| | | <result column="actual_open_time" jdbcType="TIMESTAMP" property="actualOpenTime"/> |
| | | <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> |
| | | <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> |
| | | <result column="pre_start_time" property="preStartTime" jdbcType="TIMESTAMP"/> |
| | | <result column="actual_start_time" property="actualStartTime" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | id, app_id, sponsor_id, `name`, material_poster, material_tag_image, material_, `desc`, |
| | | max_person_count,current_person_count, state, state_remarks, start_time, pre_finish_time,actual_finish_time, pre_open_time,actual_open_time, create_time, |
| | | update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <sql id="Base_Column_List">id, app_id, sponsor_id, `name`, material_poster, material_tag_image, material_, `desc`, max_person_count,current_person_count, state, state_remarks, pre_finish_time,actual_finish_time, pre_open_time,actual_open_time, create_time, update_time,`state`,pre_start_time,actual_start_time</sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">select |
| | | <include refid="Base_Column_List"/> |
| | | from lucky_activity |
| | | where id = #{id,jdbcType=BIGINT} |
| | | from lucky_activity where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="selectByPrimaryKeyForUpdate" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | select |
| | | <select id="selectByPrimaryKeyForUpdate" parameterType="java.lang.Long" resultMap="BaseResultMap">select |
| | | <include refid="Base_Column_List"/> |
| | | from lucky_activity |
| | | where id = #{0} for update |
| | | from lucky_activity where id = #{0} for update |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | delete from lucky_activity |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.ks.lucky.pojo.DO.LuckyActivity"> |
| | | insert into lucky_activity (id, app_id, sponsor_id, |
| | | `name`, material_poster, material_tag_image, |
| | | material_, `desc`, max_person_count, current_person_count, |
| | | state, state_remarks, start_time, |
| | | pre_finish_time,actual_finish_time, pre_open_time, actual_open_time,create_time, |
| | | update_time) |
| | | values (#{id,jdbcType=BIGINT}, #{appId,jdbcType=BIGINT}, #{sponsorId,jdbcType=BIGINT}, |
| | | #{name,jdbcType=VARCHAR}, #{materialPoster,jdbcType=VARCHAR}, #{materialTagImage,jdbcType=VARCHAR}, |
| | | #{material,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, #{maxPersonCount,jdbcType=INTEGER}, #{currentPersonCount,jdbcType=INTEGER}, |
| | | #{state,jdbcType=INTEGER}, #{stateRemarks,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, |
| | | #{preFinishTime,jdbcType=TIMESTAMP}, #{actualFinishTime,jdbcType=TIMESTAMP}, #{preOpenTime,jdbcType=TIMESTAMP}, #{actualOpenTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, |
| | | #{updateTime,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.ks.lucky.pojo.DO.LuckyActivity"> |
| | | insert into lucky_activity |
| | | <delete id="deleteByPrimaryKey" |
| | | parameterType="java.lang.Long">delete from lucky_activity where id = #{id,jdbcType=BIGINT}</delete> |
| | | <insert id="insert" useGeneratedKeys="true" keyProperty="id" |
| | | parameterType="com.ks.lucky.pojo.DO.LuckyActivity">insert into lucky_activity (id, app_id, sponsor_id, `name`, material_poster, material_tag_image, material_, `desc`, max_person_count, current_person_count, state, state_remarks, pre_finish_time,actual_finish_time, pre_open_time, actual_open_time,create_time, update_time,id,`state`,pre_start_time,actual_start_time) values (#{id,jdbcType=BIGINT}, #{appId,jdbcType=BIGINT}, #{sponsorId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{materialPoster,jdbcType=VARCHAR}, #{materialTagImage,jdbcType=VARCHAR}, #{material,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, #{maxPersonCount,jdbcType=INTEGER}, #{currentPersonCount,jdbcType=INTEGER}, #{state,jdbcType=INTEGER}, #{stateRemarks,jdbcType=VARCHAR}, #{preFinishTime,jdbcType=TIMESTAMP}, #{actualFinishTime,jdbcType=TIMESTAMP}, #{preOpenTime,jdbcType=TIMESTAMP}, #{actualOpenTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{id,jdbcType=BIGINT},#{state,jdbcType=INTEGER},#{preStartTime,jdbcType=TIMESTAMP},#{actualStartTime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" |
| | | parameterType="com.ks.lucky.pojo.DO.LuckyActivity">insert into lucky_activity |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="appId != null"> |
| | | app_id, |
| | | </if> |
| | | <if test="sponsorId != null"> |
| | | sponsor_id, |
| | | </if> |
| | | <if test="name != null"> |
| | | `name`, |
| | | </if> |
| | | <if test="materialPoster != null"> |
| | | material_poster, |
| | | </if> |
| | | <if test="materialTagImage != null"> |
| | | material_tag_image, |
| | | </if> |
| | | <if test="material != null"> |
| | | material_, |
| | | </if> |
| | | <if test="desc != null"> |
| | | `desc`, |
| | | </if> |
| | | <if test="maxPersonCount != null"> |
| | | max_person_count, |
| | | </if> |
| | | <if test="currentPersonCount != null"> |
| | | current_person_count, |
| | | </if> |
| | | <if test="state != null"> |
| | | state, |
| | | </if> |
| | | <if test="stateRemarks != null"> |
| | | state_remarks, |
| | | </if> |
| | | <if test="startTime != null"> |
| | | start_time, |
| | | </if> |
| | | <if test="preFinishTime != null"> |
| | | pre_finish_time, |
| | | </if> |
| | | |
| | | <if test="actualFinishTime != null"> |
| | | actual_finish_time, |
| | | </if> |
| | | |
| | | |
| | | <if test="preOpenTime != null"> |
| | | pre_open_time, |
| | | </if> |
| | | |
| | | <if test="actualOpenTime != null"> |
| | | actual_open_time, |
| | | </if> |
| | | |
| | | |
| | | <if test="createTime != null"> |
| | | create_time, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | update_time, |
| | | </if> |
| | | <if test="id != null">id,</if> |
| | | <if test="appId != null">app_id,</if> |
| | | <if test="sponsorId != null">sponsor_id,</if> |
| | | <if test="name != null">`name`,</if> |
| | | <if test="materialPoster != null">material_poster,</if> |
| | | <if test="materialTagImage != null">material_tag_image,</if> |
| | | <if test="material != null">material_,</if> |
| | | <if test="desc != null">`desc`,</if> |
| | | <if test="maxPersonCount != null">max_person_count,</if> |
| | | <if test="currentPersonCount != null">current_person_count,</if> |
| | | <if test="state != null">state,</if> |
| | | <if test="stateRemarks != null">state_remarks,</if> |
| | | <if test="preFinishTime != null">pre_finish_time,</if> |
| | | <if test="actualFinishTime != null">actual_finish_time,</if> |
| | | <if test="preOpenTime != null">pre_open_time,</if> |
| | | <if test="actualOpenTime != null">actual_open_time,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="state != null">`state`,</if> |
| | | <if test="preStartTime != null">pre_start_time,</if> |
| | | <if test="actualStartTime != null">actual_start_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="appId != null"> |
| | | #{appId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="sponsorId != null"> |
| | | #{sponsorId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="name != null"> |
| | | #{name,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="materialPoster != null"> |
| | | #{materialPoster,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="materialTagImage != null"> |
| | | #{materialTagImage,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="material != null"> |
| | | #{material,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="desc != null"> |
| | | #{desc,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="maxPersonCount != null"> |
| | | #{maxPersonCount,jdbcType=INTEGER}, |
| | | </if> |
| | | |
| | | <if test="currentPersonCount != null"> |
| | | #{currentPersonCount,jdbcType=INTEGER}, |
| | | </if> |
| | | |
| | | <if test="state != null"> |
| | | #{state,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="stateRemarks != null"> |
| | | #{stateRemarks,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="startTime != null"> |
| | | #{startTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="preFinishTime != null"> |
| | | #{preFinishTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | |
| | | <if test="actualFinishTime != null"> |
| | | #{actualFinishTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | |
| | | <if test="preOpenTime != null"> |
| | | #{preOpenTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="actualOpenTime != null"> |
| | | #{actualOpenTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="createTime != null"> |
| | | #{createTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | #{updateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="appId != null">#{appId,jdbcType=BIGINT},</if> |
| | | <if test="sponsorId != null">#{sponsorId,jdbcType=BIGINT},</if> |
| | | <if test="name != null">#{name,jdbcType=VARCHAR},</if> |
| | | <if test="materialPoster != null">#{materialPoster,jdbcType=VARCHAR},</if> |
| | | <if test="materialTagImage != null">#{materialTagImage,jdbcType=VARCHAR},</if> |
| | | <if test="material != null">#{material,jdbcType=VARCHAR},</if> |
| | | <if test="desc != null">#{desc,jdbcType=VARCHAR},</if> |
| | | <if test="maxPersonCount != null">#{maxPersonCount,jdbcType=INTEGER},</if> |
| | | <if test="currentPersonCount != null">#{currentPersonCount,jdbcType=INTEGER},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if> |
| | | <if test="stateRemarks != null">#{stateRemarks,jdbcType=VARCHAR},</if> |
| | | <if test="preFinishTime != null">#{preFinishTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="actualFinishTime != null">#{actualFinishTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="preOpenTime != null">#{preOpenTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="actualOpenTime != null">#{actualOpenTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER}</if> |
| | | <if test="preStartTime != null">#{preStartTime,jdbcType=TIMESTAMP}</if> |
| | | <if test="actualStartTime != null">#{actualStartTime,jdbcType=TIMESTAMP}</if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.ks.lucky.pojo.DO.LuckyActivity"> |
| | | update lucky_activity |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.ks.lucky.pojo.DO.LuckyActivity">update lucky_activity |
| | | <set> |
| | | <if test="appId != null"> |
| | | app_id = #{appId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="sponsorId != null"> |
| | | sponsor_id = #{sponsorId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="name != null"> |
| | | `name` = #{name,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="materialPoster != null"> |
| | | material_poster = #{materialPoster,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="materialTagImage != null"> |
| | | material_tag_image = #{materialTagImage,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="material != null"> |
| | | material_ = #{material,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="desc != null"> |
| | | `desc` = #{desc,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="maxPersonCount != null"> |
| | | max_person_count = #{maxPersonCount,jdbcType=INTEGER}, |
| | | </if> |
| | | |
| | | <if test="currentPersonCount != null"> |
| | | current_person_count = #{currentPersonCount,jdbcType=INTEGER}, |
| | | </if> |
| | | |
| | | <if test="state != null"> |
| | | state = #{state,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="stateRemarks != null"> |
| | | state_remarks = #{stateRemarks,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="startTime != null"> |
| | | start_time = #{startTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="preFinishTime != null"> |
| | | pre_finish_time = #{preFinishTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | |
| | | <if test="actualFinishTime != null"> |
| | | actual_finish_time = #{actualFinishTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | |
| | | <if test="preOpenTime != null"> |
| | | pre_open_time = #{preOpenTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | |
| | | <if test="actualOpenTime != null"> |
| | | actual_open_time = #{actualOpenTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="createTime != null"> |
| | | create_time = #{createTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="updateTime != null"> |
| | | update_time = #{updateTime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="appId != null">app_id = #{appId,jdbcType=BIGINT},</if> |
| | | <if test="sponsorId != null">sponsor_id = #{sponsorId,jdbcType=BIGINT},</if> |
| | | <if test="name != null">`name` = #{name,jdbcType=VARCHAR},</if> |
| | | <if test="materialPoster != null">material_poster = #{materialPoster,jdbcType=VARCHAR},</if> |
| | | <if test="materialTagImage != null">material_tag_image = #{materialTagImage,jdbcType=VARCHAR},</if> |
| | | <if test="material != null">material_ = #{material,jdbcType=VARCHAR},</if> |
| | | <if test="desc != null">`desc` = #{desc,jdbcType=VARCHAR},</if> |
| | | <if test="maxPersonCount != null">max_person_count = #{maxPersonCount,jdbcType=INTEGER},</if> |
| | | <if test="currentPersonCount != null">current_person_count = #{currentPersonCount,jdbcType=INTEGER},</if> |
| | | <if test="state != null">state = #{state,jdbcType=INTEGER},</if> |
| | | <if test="stateRemarks != null">state_remarks = #{stateRemarks,jdbcType=VARCHAR},</if> |
| | | <if test="preFinishTime != null">pre_finish_time = #{preFinishTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="actualFinishTime != null">actual_finish_time = #{actualFinishTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="preOpenTime != null">pre_open_time = #{preOpenTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="actualOpenTime != null">actual_open_time = #{actualOpenTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="createTime != null">create_time = #{createTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="state !=null">`state` =#{state,jdbcType=INTEGER},</if> |
| | | <if test="preStartTime !=null">pre_start_time =#{preStartTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="actualStartTime !=null">actual_start_time =#{actualStartTime,jdbcType=TIMESTAMP},</if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.ks.lucky.pojo.DO.LuckyActivity"> |
| | | update lucky_activity |
| | | set app_id = #{appId,jdbcType=BIGINT}, |
| | | sponsor_id = #{sponsorId,jdbcType=BIGINT}, |
| | | `name` = #{name,jdbcType=VARCHAR}, |
| | | material_poster = #{materialPoster,jdbcType=VARCHAR}, |
| | | material_tag_image = #{materialTagImage,jdbcType=VARCHAR}, |
| | | material_ = #{material,jdbcType=VARCHAR}, |
| | | `desc` = #{desc,jdbcType=VARCHAR}, |
| | | max_person_count = #{maxPersonCount,jdbcType=INTEGER}, |
| | | current_person_count = #{currentPersonCount,jdbcType=INTEGER}, |
| | | state = #{state,jdbcType=INTEGER}, |
| | | state_remarks = #{stateRemarks,jdbcType=VARCHAR}, |
| | | start_time = #{startTime,jdbcType=TIMESTAMP}, |
| | | pre_finish_time = #{preFinishTime,jdbcType=TIMESTAMP}, |
| | | actual_finish_time = #{actualFinishTime,jdbcType=TIMESTAMP}, |
| | | pre_open_time = #{preOpenTime,jdbcType=TIMESTAMP}, |
| | | actual_open_time = #{actualOpenTime,jdbcType=TIMESTAMP}, |
| | | create_time = #{createTime,jdbcType=TIMESTAMP}, |
| | | update_time = #{updateTime,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | update lucky_activity set app_id = #{appId,jdbcType=BIGINT}, sponsor_id = #{sponsorId,jdbcType=BIGINT}, `name` = #{name,jdbcType=VARCHAR}, material_poster = #{materialPoster,jdbcType=VARCHAR}, material_tag_image = #{materialTagImage,jdbcType=VARCHAR}, material_ = #{material,jdbcType=VARCHAR}, `desc` = #{desc,jdbcType=VARCHAR}, max_person_count = #{maxPersonCount,jdbcType=INTEGER}, current_person_count = #{currentPersonCount,jdbcType=INTEGER}, state = #{state,jdbcType=INTEGER}, state_remarks = #{stateRemarks,jdbcType=VARCHAR}, pre_finish_time = #{preFinishTime,jdbcType=TIMESTAMP}, actual_finish_time = #{actualFinishTime,jdbcType=TIMESTAMP}, pre_open_time = #{preOpenTime,jdbcType=TIMESTAMP}, actual_open_time = #{actualOpenTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP} ,`state` =#{state,jdbcType=INTEGER} ,pre_start_time =#{preStartTime,jdbcType=TIMESTAMP} ,actual_start_time =#{actualStartTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=BIGINT}</update> |
| | | <sql id="queryWhere"> |
| | | |
| | | <if test="query.key!=null"> |
| | | and `name` like '${query.key}%' |
| | | </if> |
| | | |
| | | <if test="query.appId!=null"> |
| | | and app_id=#{query.appId} |
| | | </if> |
| | | |
| | | <if test="query.sponsorId!=null"> |
| | | and sponsor_id= #{query.sponsorId} |
| | | </if> |
| | | |
| | | <if test="query.key!=null">and `name` like '${query.key}%'</if> |
| | | <if test="query.appId!=null">and app_id=#{query.appId}</if> |
| | | <if test="query.sponsorId!=null">and sponsor_id= #{query.sponsorId}</if> |
| | | <if test="query.full!=null"> |
| | | <if test="query.full=true"> |
| | | and max_person_count=current_person_count |
| | | <if test="query.full=true">and max_person_count=current_person_count</if> |
| | | </if> |
| | | </if> |
| | | |
| | | <if test="query.stateList!=null"> |
| | | <foreach collection="query.stateList" item="state" open=" and (" close=")" separator=" or "> |
| | | state=#{state} |
| | | <foreach collection="query.stateList" item="state" open=" and (" close=")" separator=" or ">state=#{state} |
| | | </foreach> |
| | | </if> |
| | | |
| | | <if test="query.minCreateTime!=null"> |
| | | and create_time>=#{query.minCreateTime} |
| | | </if> |
| | | |
| | | <if test="query.maxCreateTime!=null"> |
| | | and #{query.maxCreateTime}>create_time |
| | | </if> |
| | | |
| | | |
| | | <if test="query.minStartTime!=null"> |
| | | and start_time>=#{query.minStartTime} |
| | | </if> |
| | | |
| | | <if test="query.maxStartTime!=null"> |
| | | and #{query.maxStartTime}>start_time |
| | | </if> |
| | | |
| | | |
| | | <if test="query.minFinishTime!=null"> |
| | | and pre_finish_time>=#{query.minFinishTime} |
| | | </if> |
| | | |
| | | <if test="query.maxFinishTime!=null"> |
| | | and #{query.maxFinishTime}>pre_finish_time |
| | | </if> |
| | | |
| | | <if test="query.minCreateTime!=null">and create_time>=#{query.minCreateTime}</if> |
| | | <if test="query.maxCreateTime!=null">and #{query.maxCreateTime}>create_time</if> |
| | | <if test="query.minStartTime!=null">and pre_start_time>=#{query.minStartTime}</if> |
| | | <if test="query.maxStartTime!=null">and #{query.maxStartTime}>start_time</if> |
| | | <if test="query.minFinishTime!=null">and pre_finish_time>=#{query.minFinishTime}</if> |
| | | <if test="query.maxFinishTime!=null">and #{query.maxFinishTime}>pre_finish_time</if> |
| | | </sql> |
| | | |
| | | |
| | | <select id="list" resultMap="BaseResultMap"> |
| | | select |
| | | <select id="list" resultMap="BaseResultMap">select |
| | | <include refid="Base_Column_List"/> |
| | | from lucky_activity |
| | | where 1=1 |
| | | <include refid="queryWhere"></include> |
| | | <if test="query.sort!=null"> |
| | | order by #{query.sort} |
| | | </if> |
| | | from lucky_activity where 1=1 |
| | | <include refid="queryWhere"/> |
| | | <if test="query.sort!=null">order by #{query.sort}</if> |
| | | limit #{query.start},#{query.count} |
| | | </select> |
| | | |
| | | <select id="count" resultType="java.lang.Long"> |
| | | select |
| | | count(*) |
| | | from lucky_activity |
| | | where 1=1 |
| | | <include refid="queryWhere"></include> |
| | | |
| | | <select id="count" resultType="java.lang.Long">select count(*) from lucky_activity where 1=1 |
| | | <include refid="queryWhere"/> |
| | | </select> |
| | | |
| | | |
| | | <update id="addJoinCount"> |
| | | |
| | | update lucky_activity set current_person_count=current_person_count+#{joinCount} where id=#{activityId} |
| | | |
| | | </update> |
| | | |
| | | <update id="addJoinCount">update lucky_activity set current_person_count=current_person_count+#{joinCount} where id=#{activityId}</update> |
| | | </mapper> |