| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124 |
- <?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.ruixuan.data.mapper.KuaishouLiveDataFunnelMapper">
- <resultMap type="com.ruixuan.data.entity.KuaishouLiveDataFunnel" id="KuaishouLiveDataFunnelResult">
- <result property="ksId" column="ks_id"/>
- <result property="ksName" column="ks_name"/>
- <result property="accountId" column="account_id"/>
- <result property="accountName" column="account_name"/>
- <result property="allViewers" column="all_viewers"/>
- <result property="statDate" column="stat_date"/>
- <result property="createTime" column="create_time"/>
- <result property="updateTime" column="update_time"/>
- </resultMap>
- <sql id="selectKuaishouLiveDataFunnelVo">
- select ks_id,
- ks_name,
- account_id,
- account_name,
- all_viewers,
- stat_date,
- create_time,
- update_time
- from kuaishou_live_data_funnel
- </sql>
- <select id="selectKuaishouLiveDataFunnelList" parameterType="com.ruixuan.data.entity.KuaishouLiveDataFunnel"
- resultMap="KuaishouLiveDataFunnelResult">
- <include refid="selectKuaishouLiveDataFunnelVo"/>
- <where>
- <if test="ksId != null ">and ks_id = #{ksId}</if>
- <if test="ksName != null and ksName != ''">and ks_name like concat('%', #{ksName}, '%')</if>
- <if test="accountId != null ">and account_id = #{accountId}</if>
- <if test="accountName != null and accountName != ''">and account_name like concat('%', #{accountName},
- '%')
- </if>
- <if test="allViewers != null ">and all_viewers = #{allViewers}</if>
- <if test="statDate != null and statDate != ''">and stat_date = #{statDate}</if>
- </where>
- </select>
- <select id="selectKuaishouLiveDataFunnelByKsId" parameterType="Long" resultMap="KuaishouLiveDataFunnelResult">
- <include refid="selectKuaishouLiveDataFunnelVo"/>
- where ks_id = #{ksId}
- </select>
- <insert id="insertKuaishouLiveDataFunnel" parameterType="com.ruixuan.data.entity.KuaishouLiveDataFunnel">
- insert into kuaishou_live_data_funnel
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="ksId != null">ks_id,</if>
- <if test="ksName != null">ks_name,</if>
- <if test="accountId != null">account_id,</if>
- <if test="accountName != null">account_name,</if>
- <if test="allViewers != null">all_viewers,</if>
- <if test="statDate != null">stat_date,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateTime != null">update_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="ksId != null">#{ksId},</if>
- <if test="ksName != null">#{ksName},</if>
- <if test="accountId != null">#{accountId},</if>
- <if test="accountName != null">#{accountName},</if>
- <if test="allViewers != null">#{allViewers},</if>
- <if test="statDate != null">#{statDate},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateTime != null">#{updateTime},</if>
- </trim>
- </insert>
- <update id="updateKuaishouLiveDataFunnel" parameterType="com.ruixuan.data.entity.KuaishouLiveDataFunnel">
- update kuaishou_live_data_funnel
- <trim prefix="SET" suffixOverrides=",">
- <if test="ksName != null">ks_name = #{ksName},</if>
- <if test="accountId != null">account_id = #{accountId},</if>
- <if test="accountName != null">account_name = #{accountName},</if>
- <if test="allViewers != null">all_viewers = #{allViewers},</if>
- <if test="statDate != null">stat_date = #{statDate},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- </trim>
- where ks_id = #{ksId}
- </update>
- <delete id="deleteKuaishouLiveDataFunnelByKsId" parameterType="Long">
- delete
- from kuaishou_live_data_funnel
- where ks_id = #{ksId}
- </delete>
- <delete id="deleteKuaishouLiveDataFunnelByKsIds" parameterType="String">
- delete from kuaishou_live_data_funnel where ks_id in
- <foreach item="ksId" collection="array" open="(" separator="," close=")">
- #{ksId}
- </foreach>
- </delete>
- <insert id="inserExcelBatchInfo">
- replace into kuaishou_live_data_funnel(
- ks_id,
- ks_name,
- account_id,
- account_name,
- all_viewers,
- stat_date
- )
- values
- <foreach collection="funnelList" item="cell" separator=",">
- (
- #{cell.ksId},
- #{cell.ksName},
- #{cell.accountId},
- #{cell.accountName},
- #{cell.allViewers},
- #{cell.statDate}
- )
- </foreach>
- </insert>
- </mapper>
|