<?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.taoke.autopay.dao.agent.ChannelAgentOrderStatisticRecordMapper">
|
<resultMap id="BaseResultMap" type="com.taoke.autopay.entity.agent.ChannelAgentOrderStatisticRecord">
|
<id column="_id" property="id" jdbcType="BIGINT"/>
|
<result column="_agent_id" property="agentId" jdbcType="BIGINT"/>
|
<result column="_day" property="day" jdbcType="VARCHAR"/>
|
<result column="_submit_key_count" property="submitKeyCount" jdbcType="INTEGER"/>
|
<result column="_pay_count" property="payCount" jdbcType="INTEGER"/>
|
<result column="_pay_money" property="payMoney" jdbcType="DECIMAL"/>
|
<result column="_create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
<result column="_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
</resultMap>
|
<sql id="Base_Column_List">_id,_agent_id,_day,_submit_key_count,_pay_count,_pay_money,_create_time,_update_time</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
<include refid="Base_Column_List"/> from table_agent_order_statistic_record where _id = #{id,jdbcType=BIGINT}
|
</select>
|
<select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
<include refid="Base_Column_List"/> from table_agent_order_statistic_record where _id = #{id,jdbcType=BIGINT} for update
|
</select>
|
<sql id="listWhereSQL">
|
<if test="query.id!=null">AND _id = #{query.id}</if>
|
<if test="query.agentId!=null">AND _agent_id = #{query.agentId}</if>
|
<if test="query.day!=null">AND _day = #{query.day}</if>
|
<if test="query.submitKeyCount!=null">AND _submit_key_count = #{query.submitKeyCount}</if>
|
<if test="query.payCount!=null">AND _pay_count = #{query.payCount}</if>
|
<if test="query.payMoney!=null">AND _pay_money = #{query.payMoney}</if>
|
<if test="query.minCreateTime!=null">AND _create_time >= #{query.minCreateTime}</if>
|
<if test="query.maxCreateTime!=null">AND #{query.maxCreateTime} > _create_time</if>
|
<if test="query.minUpdateTime!=null">AND _update_time >= #{query.minUpdateTime}</if>
|
<if test="query.maxUpdateTime!=null">AND #{query.maxUpdateTime} > _update_time</if>
|
</sql>
|
<select id="list" resultMap="BaseResultMap">select
|
<include refid="Base_Column_List"/> from table_agent_order_statistic_record where 1=1
|
<include refid="listWhereSQL"/>
|
<if test="query.sortList!=null">
|
<foreach collection="query.sortList" item="item" open=" order by " separator=",">#{item}</foreach>
|
</if>limit #{query.start},#{query.count}
|
</select>
|
<select id="count" resultType="java.lang.Long">select count(*) from table_agent_order_statistic_record where 1=1
|
<include refid="listWhereSQL"/>
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from table_agent_order_statistic_record where _id = #{id,jdbcType=BIGINT}</delete>
|
<insert id="insert" parameterType="com.taoke.autopay.entity.agent.ChannelAgentOrderStatisticRecord" useGeneratedKeys="true" keyProperty="id">insert into table_agent_order_statistic_record (_id,_agent_id,_day,_submit_key_count,_pay_count,_pay_money,_create_time,_update_time) values (#{id,jdbcType=BIGINT},#{agentId,jdbcType=BIGINT},#{day,jdbcType=VARCHAR},#{submitKeyCount,jdbcType=INTEGER},#{payCount,jdbcType=INTEGER},#{payMoney,jdbcType=DECIMAL},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
|
<insert id="insertSelective" parameterType="com.taoke.autopay.entity.agent.ChannelAgentOrderStatisticRecord" useGeneratedKeys="true" keyProperty="id">insert into table_agent_order_statistic_record
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">_id,</if>
|
<if test="agentId != null">_agent_id,</if>
|
<if test="day != null">_day,</if>
|
<if test="submitKeyCount != null">_submit_key_count,</if>
|
<if test="payCount != null">_pay_count,</if>
|
<if test="payMoney != null">_pay_money,</if>
|
<if test="createTime != null">_create_time,</if>
|
<if test="updateTime != null">_update_time,</if>
|
</trim>values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="agentId != null">#{agentId,jdbcType=BIGINT},</if>
|
<if test="day != null">#{day,jdbcType=VARCHAR},</if>
|
<if test="submitKeyCount != null">#{submitKeyCount,jdbcType=INTEGER},</if>
|
<if test="payCount != null">#{payCount,jdbcType=INTEGER},</if>
|
<if test="payMoney != null">#{payMoney,jdbcType=DECIMAL},</if>
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKey" parameterType="com.taoke.autopay.entity.agent.ChannelAgentOrderStatisticRecord">update table_agent_order_statistic_record set _agent_id = #{agentId,jdbcType=BIGINT},_day = #{day,jdbcType=VARCHAR},_submit_key_count = #{submitKeyCount,jdbcType=INTEGER},_pay_count = #{payCount,jdbcType=INTEGER},_pay_money = #{payMoney,jdbcType=DECIMAL},_create_time = #{createTime,jdbcType=TIMESTAMP},_update_time = #{updateTime,jdbcType=TIMESTAMP} where _id = #{id,jdbcType=BIGINT}</update>
|
<update id="updateByPrimaryKeySelective" parameterType="com.taoke.autopay.entity.agent.ChannelAgentOrderStatisticRecord">update table_agent_order_statistic_record
|
<set>
|
<if test="agentId != null">_agent_id=#{agentId,jdbcType=BIGINT},</if>
|
<if test="day != null">_day=#{day,jdbcType=VARCHAR},</if>
|
<if test="submitKeyCount != null">_submit_key_count=#{submitKeyCount,jdbcType=INTEGER},</if>
|
<if test="payCount != null">_pay_count=#{payCount,jdbcType=INTEGER},</if>
|
<if test="payMoney != null">_pay_money=#{payMoney,jdbcType=DECIMAL},</if>
|
<if test="createTime != null">_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">_update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
</set> where _id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|