<?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.ClientAdditionalInfoMapper">
|
<resultMap id="BaseResultMap" type="com.taoke.autopay.entity.ClientAdditionalInfo">
|
<id column="client_id" property="id" jdbcType="BIGINT"/>
|
<result column="mobile" property="mobile" jdbcType="VARCHAR"/>
|
<result column="alipay_account" property="alipayAccount" jdbcType="VARCHAR"/>
|
<result column="alipay_password" property="alipayPassword" jdbcType="VARCHAR"/>
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
|
</resultMap>
|
<sql id="Base_Column_List">client_id,mobile,alipay_account,alipay_password,create_time,update_time</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
<include refid="Base_Column_List"/>
|
from table_client_additional_info where client_id = #{id,jdbcType=BIGINT}
|
</select>
|
<select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
<include refid="Base_Column_List"/>
|
from table_client_additional_info where client_id = #{id,jdbcType=BIGINT} for update
|
</select>
|
<sql id="listWhereSQL">
|
<if test="query.id!=null">AND client_id = #{query.id}</if>
|
<if test="query.mobile!=null">AND mobile = #{query.mobile}</if>
|
<if test="query.alipayAccount!=null">AND alipay_account = #{query.alipayAccount}</if>
|
<if test="query.alipayPassword!=null">AND alipay_password = #{query.alipayPassword}</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_client_additional_info 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="listByIds" resultMap="BaseResultMap" parameterType="java.lang.Long">select
|
<include refid="Base_Column_List"/>
|
from table_client_additional_info where 1=1
|
<if test="ids!=null">
|
<foreach collection="ids" item="item" open="and (" separator=" or " close=")">client_id=#{item}
|
</foreach>
|
</if>
|
</select>
|
|
<select id="count" resultType="java.lang.Long">select count(*) from table_client_additional_info where 1=1
|
<include refid="listWhereSQL"/>
|
</select>
|
<delete id="deleteByPrimaryKey"
|
parameterType="java.lang.Long">delete from table_client_additional_info where client_id = #{id,jdbcType=BIGINT}</delete>
|
<insert id="insert" parameterType="com.taoke.autopay.entity.ClientAdditionalInfo" useGeneratedKeys="true"
|
keyProperty="id">insert into table_client_additional_info (client_id,mobile,alipay_account,alipay_password,create_time,update_time) values (#{id,jdbcType=BIGINT},#{mobile,jdbcType=VARCHAR},#{alipayAccount,jdbcType=VARCHAR},#{alipayPassword,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
|
<insert id="insertSelective" parameterType="com.taoke.autopay.entity.ClientAdditionalInfo" useGeneratedKeys="true"
|
keyProperty="id">insert into table_client_additional_info
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">client_id,</if>
|
<if test="mobile != null">mobile,</if>
|
<if test="alipayAccount != null">alipay_account,</if>
|
<if test="alipayPassword != null">alipay_password,</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="mobile != null">#{mobile,jdbcType=VARCHAR},</if>
|
<if test="alipayAccount != null">#{alipayAccount,jdbcType=VARCHAR},</if>
|
<if test="alipayPassword != null">#{alipayPassword,jdbcType=VARCHAR},</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.ClientAdditionalInfo">update table_client_additional_info set mobile = #{mobile,jdbcType=VARCHAR},alipay_account = #{alipayAccount,jdbcType=VARCHAR},alipay_password = #{alipayPassword,jdbcType=VARCHAR},create_time = #{createTime,jdbcType=TIMESTAMP},update_time = #{updateTime,jdbcType=TIMESTAMP} where client_id = #{id,jdbcType=BIGINT}</update>
|
<update id="updateByPrimaryKeySelective" parameterType="com.taoke.autopay.entity.ClientAdditionalInfo">update table_client_additional_info
|
<set>
|
<if test="mobile != null">mobile=#{mobile,jdbcType=VARCHAR},</if>
|
<if test="alipayAccount != null">alipay_account=#{alipayAccount,jdbcType=VARCHAR},</if>
|
<if test="alipayPassword != null">alipay_password=#{alipayPassword,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
<if test="updateTime != null">update_time=#{updateTime,jdbcType=TIMESTAMP},</if>
|
</set>
|
where client_id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|