|
@@ -3,10 +3,10 @@
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.fs.live.mapper.LiveRedConfMapper">
|
|
<mapper namespace="com.fs.live.mapper.LiveRedConfMapper">
|
|
-
|
|
|
|
|
|
+
|
|
<resultMap type="LiveRedConf" id="LiveRedConfResult">
|
|
<resultMap type="LiveRedConf" id="LiveRedConfResult">
|
|
<result property="redId" column="red_id" />
|
|
<result property="redId" column="red_id" />
|
|
- <result property="redStauts" column="red_stauts" />
|
|
|
|
|
|
+ <result property="redStatus" column="red_stauts" />
|
|
<result property="duration" column="duration" />
|
|
<result property="duration" column="duration" />
|
|
<result property="redType" column="red_type" />
|
|
<result property="redType" column="red_type" />
|
|
<result property="liveId" column="live_id" />
|
|
<result property="liveId" column="live_id" />
|
|
@@ -15,52 +15,50 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="totalSend" column="total_send" />
|
|
<result property="totalSend" column="total_send" />
|
|
<result property="desc" column="desc" />
|
|
<result property="desc" column="desc" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createTime" column="create_time" />
|
|
- <result property="udpateTime" column="udpate_time" />
|
|
|
|
|
|
+ <result property="udpateTime" column="update_time" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateBy" column="update_by" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectLiveRedConfVo">
|
|
<sql id="selectLiveRedConfVo">
|
|
- select red_id, red_stauts, duration, red_type, live_id, red_num, total_lots, total_send, desc, create_time, udpate_time, create_by, update_by from live_red_conf
|
|
|
|
|
|
+ select red_id, red_stauts, duration, red_type, live_id, red_num, total_lots, total_send, `desc`, create_time, update_time, create_by, update_by from live_red_conf
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectLiveRedConfList" parameterType="LiveRedConf" resultMap="LiveRedConfResult">
|
|
<select id="selectLiveRedConfList" parameterType="LiveRedConf" resultMap="LiveRedConfResult">
|
|
<include refid="selectLiveRedConfVo"/>
|
|
<include refid="selectLiveRedConfVo"/>
|
|
- <where>
|
|
|
|
- <if test="redStauts != null "> and red_stauts = #{redStauts}</if>
|
|
|
|
- <if test="duration != null "> and duration = #{duration}</if>
|
|
|
|
|
|
+ <where>
|
|
|
|
+ <if test="redStatus != null "> and red_stauts = #{redStatus}</if>
|
|
<if test="redType != null "> and red_type = #{redType}</if>
|
|
<if test="redType != null "> and red_type = #{redType}</if>
|
|
<if test="liveId != null "> and live_id = #{liveId}</if>
|
|
<if test="liveId != null "> and live_id = #{liveId}</if>
|
|
- <if test="redNum != null "> and red_num = #{redNum}</if>
|
|
|
|
- <if test="totalLots != null "> and total_lots = #{totalLots}</if>
|
|
|
|
- <if test="totalSend != null "> and total_send = #{totalSend}</if>
|
|
|
|
- <if test="desc != null and desc != ''"> and desc = #{desc}</if>
|
|
|
|
|
|
+ <if test="desc != null and desc != ''"> and `desc` = #{desc}</if>
|
|
|
|
+ <if test="createTime != null "> and create_time = #{createTime}</if>
|
|
|
|
+ <if test="udpateTime != null "> and update_time = #{udpateTime}</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<select id="selectLiveRedConfByRedId" parameterType="Long" resultMap="LiveRedConfResult">
|
|
<select id="selectLiveRedConfByRedId" parameterType="Long" resultMap="LiveRedConfResult">
|
|
<include refid="selectLiveRedConfVo"/>
|
|
<include refid="selectLiveRedConfVo"/>
|
|
where red_id = #{redId}
|
|
where red_id = #{redId}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+
|
|
<insert id="insertLiveRedConf" parameterType="LiveRedConf" useGeneratedKeys="true" keyProperty="redId">
|
|
<insert id="insertLiveRedConf" parameterType="LiveRedConf" useGeneratedKeys="true" keyProperty="redId">
|
|
insert into live_red_conf
|
|
insert into live_red_conf
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
- <if test="redStauts != null">red_stauts,</if>
|
|
|
|
|
|
+ <if test="redStatus != null">red_stauts,</if>
|
|
<if test="duration != null">duration,</if>
|
|
<if test="duration != null">duration,</if>
|
|
<if test="redType != null">red_type,</if>
|
|
<if test="redType != null">red_type,</if>
|
|
<if test="liveId != null">live_id,</if>
|
|
<if test="liveId != null">live_id,</if>
|
|
<if test="redNum != null">red_num,</if>
|
|
<if test="redNum != null">red_num,</if>
|
|
<if test="totalLots != null">total_lots,</if>
|
|
<if test="totalLots != null">total_lots,</if>
|
|
<if test="totalSend != null">total_send,</if>
|
|
<if test="totalSend != null">total_send,</if>
|
|
- <if test="desc != null and desc != ''">desc,</if>
|
|
|
|
|
|
+ <if test="desc != null and desc != ''">`desc`,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
- <if test="udpateTime != null">udpate_time,</if>
|
|
|
|
|
|
+ <if test="udpateTime != null">update_time,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
- <if test="redStauts != null">#{redStauts},</if>
|
|
|
|
|
|
+ <if test="redStatus != null">#{redStatus},</if>
|
|
<if test="duration != null">#{duration},</if>
|
|
<if test="duration != null">#{duration},</if>
|
|
<if test="redType != null">#{redType},</if>
|
|
<if test="redType != null">#{redType},</if>
|
|
<if test="liveId != null">#{liveId},</if>
|
|
<if test="liveId != null">#{liveId},</if>
|
|
@@ -78,16 +76,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<update id="updateLiveRedConf" parameterType="LiveRedConf">
|
|
<update id="updateLiveRedConf" parameterType="LiveRedConf">
|
|
update live_red_conf
|
|
update live_red_conf
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
- <if test="redStauts != null">red_stauts = #{redStauts},</if>
|
|
|
|
|
|
+ <if test="redStatus != null">red_stauts = #{redStatus},</if>
|
|
<if test="duration != null">duration = #{duration},</if>
|
|
<if test="duration != null">duration = #{duration},</if>
|
|
<if test="redType != null">red_type = #{redType},</if>
|
|
<if test="redType != null">red_type = #{redType},</if>
|
|
<if test="liveId != null">live_id = #{liveId},</if>
|
|
<if test="liveId != null">live_id = #{liveId},</if>
|
|
<if test="redNum != null">red_num = #{redNum},</if>
|
|
<if test="redNum != null">red_num = #{redNum},</if>
|
|
<if test="totalLots != null">total_lots = #{totalLots},</if>
|
|
<if test="totalLots != null">total_lots = #{totalLots},</if>
|
|
<if test="totalSend != null">total_send = #{totalSend},</if>
|
|
<if test="totalSend != null">total_send = #{totalSend},</if>
|
|
- <if test="desc != null and desc != ''">desc = #{desc},</if>
|
|
|
|
|
|
+ <if test="desc != null and desc != ''">`desc` = #{desc},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
- <if test="udpateTime != null">udpate_time = #{udpateTime},</if>
|
|
|
|
|
|
+ <if test="udpateTime != null">update_time = #{udpateTime},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
</trim>
|
|
</trim>
|
|
@@ -99,9 +97,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteLiveRedConfByRedIds" parameterType="String">
|
|
<delete id="deleteLiveRedConfByRedIds" parameterType="String">
|
|
- delete from live_red_conf where red_id in
|
|
|
|
|
|
+ delete from live_red_conf where red_id in
|
|
<foreach item="redId" collection="array" open="(" separator="," close=")">
|
|
<foreach item="redId" collection="array" open="(" separator="," close=")">
|
|
#{redId}
|
|
#{redId}
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
-</mapper>
|
|
|
|
|
|
+</mapper>
|