admin
2025-02-20 fa677dec1c55db004a31beefb1e346e18c7858c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?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.UserPayCountMapper">
  <resultMap id="BaseResultMap" type="com.taoke.autopay.entity.UserPayCount">
    <id column="_id" property="id" jdbcType="BIGINT"/>
    <result column="_submit_key_count" property="submitKeyCount" jdbcType="BIGINT"/>
    <result column="_psy_count" property="payCount" jdbcType="BIGINT"/>
    <result column="_create_time" property="createTime" jdbcType="TIMESTAMP"/>
    <result column="_update_time" property="updateTime" jdbcType="TIMESTAMP"/>
  </resultMap>
  <sql id="Base_Column_List">_id,_submit_key_count,_psy_count,_create_time,_update_time</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/> from table_user_pay_count where _id = #{id,jdbcType=BIGINT}
  </select>
  <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/> from table_user_pay_count where _id = #{id,jdbcType=BIGINT} for update
  </select>
  <sql id="listWhereSQL">
    <if test="query.id!=null">AND _id = #{query.id}</if>
    <if test="query.submitKeyCount!=null">AND _submit_key_count = #{query.submitKeyCount}</if>
    <if test="query.payCount!=null">AND _psy_count = #{query.payCount}</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_user_pay_count 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_user_pay_count where 1=1
    <include refid="listWhereSQL"/>
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from table_user_pay_count where _id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.taoke.autopay.entity.UserPayCount" useGeneratedKeys="true" keyProperty="id">insert into table_user_pay_count (_id,_submit_key_count,_psy_count,_create_time,_update_time) values (#{id,jdbcType=BIGINT},#{submitKeyCount,jdbcType=BIGINT},#{payCount,jdbcType=BIGINT},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.taoke.autopay.entity.UserPayCount" useGeneratedKeys="true" keyProperty="id">insert into table_user_pay_count
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">_id,</if>
      <if test="submitKeyCount != null">_submit_key_count,</if>
      <if test="payCount != null">_psy_count,</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="submitKeyCount != null">#{submitKeyCount,jdbcType=BIGINT},</if>
      <if test="payCount != null">#{payCount,jdbcType=BIGINT},</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.UserPayCount">update table_user_pay_count set _submit_key_count = #{submitKeyCount,jdbcType=BIGINT},_psy_count = #{payCount,jdbcType=BIGINT},_create_time = #{createTime,jdbcType=TIMESTAMP},_update_time = #{updateTime,jdbcType=TIMESTAMP} where _id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.taoke.autopay.entity.UserPayCount">update table_user_pay_count
    <set>
      <if test="submitKeyCount != null">_submit_key_count=#{submitKeyCount,jdbcType=BIGINT},</if>
      <if test="payCount != null">_psy_count=#{payCount,jdbcType=BIGINT},</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>