<?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.ChannelAgentSettingsMapper">
|
<resultMap id="BaseResultMap" type="com.taoke.autopay.entity.agent.ChannelAgentSettings">
|
<id column="_id" property="id" jdbcType="BIGINT"/>
|
<result column="_max_key_count_per_day" property="maxKeyCountPerDay" jdbcType="BIGINT"/>
|
<result column="_max_pay_money_per_day" property="maxPayMoneyPerDay" jdbcType="DECIMAL"/>
|
<result column="_start_submit_time" property="startSubmitTime" jdbcType="VARCHAR"/>
|
<result column="_end_submit_time" property="endSubmitTime" jdbcType="VARCHAR"/>
|
<result column="_credit_enable" property="creditEnable" jdbcType="BOOLEAN"/> <!-- 新增字段 -->
|
<result column="_create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
<result column="_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
</resultMap>
|
<sql id="Base_Column_List">_id,_max_key_count_per_day,_max_pay_money_per_day,_start_submit_time,_end_submit_time,_credit_enable,_create_time,_update_time</sql> <!-- 新增字段 -->
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
<include refid="Base_Column_List"/> from table_agent_settings where _id = #{id,jdbcType=BIGINT}
|
</select>
|
<select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
<include refid="Base_Column_List"/> from table_agent_settings where _id = #{id,jdbcType=BIGINT} for update
|
</select>
|
<sql id="listWhereSQL">
|
<if test="query.id!=null">AND _id = #{query.id}</if>
|
<if test="query.maxKeyCountPerDay!=null">AND _max_key_count_per_day = #{query.maxKeyCountPerDay}</if>
|
<if test="query.maxPayMoneyPerDay!=null">AND _max_pay_money_per_day = #{query.maxPayMoneyPerDay}</if>
|
<if test="query.startSubmitTime!=null">AND _start_submit_time = #{query.startSubmitTime}</if>
|
<if test="query.endSubmitTime!=null">AND _end_submit_time = #{query.endSubmitTime}</if>
|
<if test="query.creditEnable!=null">AND _credit_enable = #{query.creditEnable}</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_settings 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_settings where 1=1
|
<include refid="listWhereSQL"/>
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from table_agent_settings where _id = #{id,jdbcType=BIGINT}</delete>
|
<insert id="insert" parameterType="com.taoke.autopay.entity.agent.ChannelAgentSettings" useGeneratedKeys="true" keyProperty="id">
|
insert into table_agent_settings (_id,_max_key_count_per_day,_max_pay_money_per_day,_start_submit_time,_end_submit_time,_credit_enable,_create_time,_update_time)
|
values (#{id,jdbcType=BIGINT},#{maxKeyCountPerDay,jdbcType=BIGINT},#{maxPayMoneyPerDay,jdbcType=DECIMAL},#{startSubmitTime,jdbcType=VARCHAR},#{endSubmitTime,jdbcType=VARCHAR},#{creditEnable,jdbcType=BOOLEAN},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
|
</insert>
|
<insert id="insertSelective" parameterType="com.taoke.autopay.entity.agent.ChannelAgentSettings" useGeneratedKeys="true" keyProperty="id">
|
insert into table_agent_settings
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">_id,</if>
|
<if test="maxKeyCountPerDay != null">_max_key_count_per_day,</if>
|
<if test="maxPayMoneyPerDay != null">_max_pay_money_per_day,</if>
|
<if test="startSubmitTime != null">_start_submit_time,</if>
|
<if test="endSubmitTime != null">_end_submit_time,</if>
|
<if test="creditEnable != null">_credit_enable,</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="maxKeyCountPerDay != null">#{maxKeyCountPerDay,jdbcType=BIGINT},</if>
|
<if test="maxPayMoneyPerDay != null">#{maxPayMoneyPerDay,jdbcType=DECIMAL},</if>
|
<if test="startSubmitTime != null">#{startSubmitTime,jdbcType=VARCHAR},</if>
|
<if test="endSubmitTime != null">#{endSubmitTime,jdbcType=VARCHAR},</if>
|
<if test="creditEnable != null">#{creditEnable,jdbcType=BOOLEAN},</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.ChannelAgentSettings">
|
update table_agent_settings set
|
_max_key_count_per_day = #{maxKeyCountPerDay,jdbcType=BIGINT},
|
_max_pay_money_per_day = #{maxPayMoneyPerDay,jdbcType=DECIMAL},
|
_start_submit_time = #{startSubmitTime,jdbcType=VARCHAR},
|
_end_submit_time = #{endSubmitTime,jdbcType=VARCHAR},
|
_credit_enable = #{creditEnable,jdbcType=BOOLEAN}, <!-- 新增字段 -->
|
_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.ChannelAgentSettings">
|
update table_agent_settings
|
<set>
|
<if test="maxKeyCountPerDay != null">_max_key_count_per_day=#{maxKeyCountPerDay,jdbcType=BIGINT},</if>
|
<if test="maxPayMoneyPerDay != null">_max_pay_money_per_day=#{maxPayMoneyPerDay,jdbcType=DECIMAL},</if>
|
<if test="startSubmitTime != null">_start_submit_time=#{startSubmitTime,jdbcType=VARCHAR},</if>
|
<if test="endSubmitTime != null">_end_submit_time=#{endSubmitTime,jdbcType=VARCHAR},</if>
|
<if test="creditEnable != null">_credit_enable=#{creditEnable,jdbcType=BOOLEAN},</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>
|
|
<select id="listByIds" resultMap="BaseResultMap">select
|
<include refid="Base_Column_List"/> from table_agent_settings where
|
<foreach collection="agentIds" item="item" open="(" separator=" or " close=")">_id = #{item}</foreach>
|
</select>
|
|
</mapper>
|