123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <?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.juxiao.xchat.module.xbd.mapper.marketing.DailyReportChannelPutInMapper">
- <resultMap id="BaseResultMap" type="com.juxiao.xchat.module.xbd.domain.marketing.DailyReportChannelPutIn" >
- <id column="put_in_date" property="putInDate" jdbcType="VARCHAR" />
- <id column="channel" property="channel" jdbcType="VARCHAR" />
- <id column="app" property="app" jdbcType="VARCHAR" />
- <result column="amount_invested" property="amountInvested" jdbcType="INTEGER" />
- <result column="total_download" property="totalDownload" jdbcType="INTEGER" />
- <result column="purchase_download" property="purchaseDownload" jdbcType="INTEGER" />
- </resultMap>
- <sql id="Base_Column_List" >
- put_in_date, channel, app, amount_invested, total_download, purchase_download
- </sql>
- <select id="selectByPrimaryKey" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from daily_report_channel_put_in
- where put_in_date = #{putInDate,jdbcType=VARCHAR}
- and channel = #{channel,jdbcType=VARCHAR}
- and app = #{app,jdbcType=VARCHAR}
- </select>
- <insert id="insert" parameterType="com.juxiao.xchat.module.xbd.domain.marketing.DailyReportChannelPutIn" >
- insert into daily_report_channel_put_in (put_in_date, channel, app,
- amount_invested, total_download, purchase_download
- )
- values (#{putInDate,jdbcType=VARCHAR}, #{channel,jdbcType=VARCHAR}, #{app,jdbcType=VARCHAR},
- #{amountInvested,jdbcType=INTEGER}, #{totalDownload,jdbcType=INTEGER}, #{purchaseDownload,jdbcType=INTEGER}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.juxiao.xchat.module.xbd.domain.marketing.DailyReportChannelPutIn" >
- insert into daily_report_channel_put_in
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="putInDate != null" >
- put_in_date,
- </if>
- <if test="channel != null" >
- channel,
- </if>
- <if test="app != null" >
- app,
- </if>
- <if test="amountInvested != null" >
- amount_invested,
- </if>
- <if test="totalDownload != null" >
- total_download,
- </if>
- <if test="purchaseDownload != null" >
- purchase_download,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="putInDate != null" >
- #{putInDate,jdbcType=VARCHAR},
- </if>
- <if test="channel != null" >
- #{channel,jdbcType=VARCHAR},
- </if>
- <if test="app != null" >
- #{app,jdbcType=VARCHAR},
- </if>
- <if test="amountInvested != null" >
- #{amountInvested,jdbcType=INTEGER},
- </if>
- <if test="totalDownload != null" >
- #{totalDownload,jdbcType=INTEGER},
- </if>
- <if test="purchaseDownload != null" >
- #{purchaseDownload,jdbcType=INTEGER},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.juxiao.xchat.module.xbd.domain.marketing.DailyReportChannelPutIn" >
- update daily_report_channel_put_in
- <set >
- <if test="amountInvested != null" >
- amount_invested = #{amountInvested,jdbcType=INTEGER},
- </if>
- <if test="totalDownload != null" >
- total_download = #{totalDownload,jdbcType=INTEGER},
- </if>
- <if test="purchaseDownload != null" >
- purchase_download = #{purchaseDownload,jdbcType=INTEGER},
- </if>
- </set>
- where put_in_date = #{putInDate,jdbcType=VARCHAR}
- and channel = #{channel,jdbcType=VARCHAR}
- and app = #{app,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.juxiao.xchat.module.xbd.domain.marketing.DailyReportChannelPutIn" >
- update daily_report_channel_put_in
- set amount_invested = #{amountInvested,jdbcType=INTEGER},
- total_download = #{totalDownload,jdbcType=INTEGER},
- purchase_download = #{purchaseDownload,jdbcType=INTEGER}
- where put_in_date = #{putInDate,jdbcType=VARCHAR}
- and channel = #{channel,jdbcType=VARCHAR}
- and app = #{app,jdbcType=VARCHAR}
- </update>
- <delete id="deleteByPrimaryKey">
- delete from daily_report_channel_put_in
- where put_in_date = #{putInDate,jdbcType=VARCHAR}
- and channel = #{channel,jdbcType=VARCHAR}
- and app = #{app,jdbcType=VARCHAR}
- </delete>
- <select id="selectDailyReportChannelPutInByList" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from daily_report_channel_put_in
- where 1 = 1
- <if test="channel != null and channel != ''">
- and channel = #{channel}
- </if>
- <if test="app != null and app != ''">
- and app = #{app}
- </if>
- <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
- and put_in_date between #{beginTime} and #{endTime}
- </if>
- order by put_in_date desc
- </select>
- </mapper>
|