l.id_,l.group_id_, l.prize_id_,d.name_,d.reward_type_, l.user_id_, l.create_on_ delete from luck_draw_log where id_ = #{id,jdbcType=BIGINT} insert into luck_draw_log (id_,group_id_, prize_id_, user_id_, create_on_) values (#{id,jdbcType=BIGINT}, #{groupId,jdbcType=INTEGER}, #{prizeId,jdbcType=INTEGER}, #{userId,jdbcType=BIGINT}, #{createOn,jdbcType=TIMESTAMP}) update luck_draw_log group_id_ = #{groupId,jdbcType=INTEGER}, prize_id_ = #{prizeId,jdbcType=INTEGER}, user_id_ = #{userId,jdbcType=BIGINT}, create_on_ = #{createOn,jdbcType=TIMESTAMP}, where id_ = #{id,jdbcType=BIGINT} AND l.prize_id_ = #{id} AND l.user_id_ = #{userId} AND d.reward_type_ LIKE CONCAT('%',#{rewardType},'%') AND l.group_id_ = #{groupId} AND d.name_ = #{name} AND l.create_on_ >= #{startDate} AND l.create_on_ <= #{endDate} AND u.organ_id_ = #{organId} AND d.is_default_ = #{defaultFlag} AND (u.username_ LIKE CONCAT('%',#{search},'%') OR u.id_ = #{search})