ChannelReportFormMapper.xml 3.39 KB
<?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.yoho.unions.dal.IChannelReportFormDAO" >

    <insert id="insert" parameterType="com.yoho.unions.dal.model.ChannelReportForm" keyProperty="id" useGeneratedKeys="true" >
        insert into
            channnel_report_form (
                id,
                app_key,
                channel_code,
                channel_name,
                channel_cost,
                exposure_num,
                click_num,
                date_id,
                create_time,
                update_time
            )
        values (
               #{id,jdbcType=INTEGER},
               #{appKey,jdbcType=VARCHAR},
               #{channelCode,jdbcType=INTEGER},
               #{channelName,jdbcType=VARCHAR},
               #{actualCost,jdbcType=DECIMAL},
               #{exposureNum,jdbcType=INTEGER},
               #{clickNum,jdbcType=INTEGER},
               #{dateId,jdbcType=INTEGER},
               #{createTime,jdbcType=INTEGER},
               #{updateTime,jdbcType=INTEGER}
        )
    </insert>
    <insert id="insertSelective" parameterType="com.yoho.unions.dal.model.ChannelReportForm" keyProperty="id" useGeneratedKeys="true">
        insert into channnel_report_form
        <trim prefix="(" suffix=")" suffixOverrides="," >
            <if test="id != null" >
                id,
            </if>
            <if test="appKey != null" >
                app_key,
            </if>
            <if test="channelCode != null" >
                channel_code,
            </if>
            <if test="channelName != null" >
                channel_name,
            </if>
            <if test="actualCost != null" >
                channel_cost,
            </if>
            <if test="exposureNum != null" >
                exposure_num,
            </if>
            <if test="clickNum != null" >
                click_num,
            </if>
            <if test="dateId != null" >
                date_id,
            </if>
            <if test="createTime != null" >
                create_time,
            </if>
            <if test="updateTime != null" >
                update_time,
            </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides="," >
            <if test="id != null" >
                #{id,jdbcType=INTEGER},
            </if>
            <if test="appKey != null" >
                #{appKey,jdbcType=VARCHAR},
            </if>
            <if test="channelCode != null" >
                #{channelCode,jdbcType=INTEGER},
            </if>
            <if test="channelName != null" >
                #{channelName,jdbcType=INTEGER},
            </if>
            <if test="actualCost != null" >
                #{actualCost,jdbcType=INTEGER},
            </if>
            <if test="exposureNum != null">
                #{exposureNum,jdbcType=INTEGER},
            </if>
            <if test="clickNum != null">
              #{clickNum,jdbcType=INTEGER},
            </if>
            <if test="dateId != null">
              #{dateId,jdbcType=INTEGER},
            </if>
            <if test="createTime != null">
                #{createTime,jdbcType=INTEGER},
            </if>
            <if test="updateTime != null">
                #{updateTime,jdbcType=INTEGER},
            </if>
        </trim>
    </insert>

</mapper>