| | |
| | | <result column="state_remarks" jdbcType="VARCHAR" property="stateRemarks"/> |
| | | <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, pre_finish_time,actual_finish_time, pre_open_time,actual_open_time, create_time, update_time,pre_start_time,actual_start_time</sql> |
| | | <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, create_time, update_time,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} |
| | |
| | | <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,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},#{preStartTime,jdbcType=TIMESTAMP},#{actualStartTime,jdbcType=TIMESTAMP})</insert> |
| | | 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,create_time, update_time,id,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}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{id,jdbcType=BIGINT},#{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="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="preStartTime != null">pre_start_time,</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="preStartTime != null">#{preStartTime,jdbcType=TIMESTAMP},</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="preStartTime !=null">pre_start_time =#{preStartTime,jdbcType=TIMESTAMP},</if> |
| | |
| | | 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}, 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} ,pre_start_time =#{preStartTime,jdbcType=TIMESTAMP} ,actual_start_time =#{actualStartTime,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}, create_time = #{createTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP} ,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> |