admin
2024-06-30 b6fdf185c7e8fb1f06da0e609e39aecaef6b66f5
src/main/resources/mapper/ClientInfoMapper.xml
@@ -13,10 +13,12 @@
  </resultMap>
  <sql id="Base_Column_List">id,`name`,account,pwd,create_time,active_time,rule</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/> from table_user where id = #{id,jdbcType=BIGINT}
        <include refid="Base_Column_List"/>
        from table_user where id = #{id,jdbcType=BIGINT}
  </select>
  <select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/> from table_user where id = #{id,jdbcType=BIGINT} for update
        <include refid="Base_Column_List"/>
        from table_user where id = #{id,jdbcType=BIGINT} for update
  </select>
  <sql id="listWhereSQL">
    <if test="query.id!=null">AND id = #{query.id}</if>
@@ -30,18 +32,34 @@
    <if test="query.rule!=null">AND rule = #{query.rule}</if>
  </sql>
  <select id="list" resultMap="BaseResultMap">select
    <include refid="Base_Column_List"/> from table_user where 1=1
        <include refid="Base_Column_List"/>
        from table_user 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}
        </if>
        limit #{query.start},#{query.count}
  </select>
    <select id="listByIds" resultMap="BaseResultMap" parameterType="java.lang.Long">select
        <include refid="Base_Column_List"/>
        from table_user where 1=1
        <if test="ids!=null">
            <foreach collection="ids" item="item" open="and (" separator=" or " close=")">id=#{item}
            </foreach>
        </if>
    </select>
  <select id="count" resultType="java.lang.Long">select count(*) from table_user where 1=1
    <include refid="listWhereSQL"/>
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from table_user where id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.taoke.autopay.entity.ClientInfo" useGeneratedKeys="true" keyProperty="id">insert into table_user (id,`name`,account,pwd,create_time,active_time,rule) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{account,jdbcType=VARCHAR},#{pwd,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{activeTime,jdbcType=TIMESTAMP},#{rule,jdbcType=INTEGER})</insert>
  <insert id="insertSelective" parameterType="com.taoke.autopay.entity.ClientInfo" useGeneratedKeys="true" keyProperty="id">insert into table_user
    <delete id="deleteByPrimaryKey"
            parameterType="java.lang.Long">delete from table_user where id = #{id,jdbcType=BIGINT}</delete>
    <insert id="insert" parameterType="com.taoke.autopay.entity.ClientInfo" useGeneratedKeys="true"
            keyProperty="id">insert into table_user (id,`name`,account,pwd,create_time,active_time,rule) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{account,jdbcType=VARCHAR},#{pwd,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{activeTime,jdbcType=TIMESTAMP},#{rule,jdbcType=INTEGER})</insert>
    <insert id="insertSelective" parameterType="com.taoke.autopay.entity.ClientInfo" useGeneratedKeys="true"
            keyProperty="id">insert into table_user
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">id,</if>
      <if test="name != null">`name`,</if>
@@ -50,7 +68,8 @@
      <if test="createTime != null">create_time,</if>
      <if test="activeTime != null">active_time,</if>
      <if test="rule != null">rule,</if>
    </trim>values
        </trim>
        values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="name != null">#{name,jdbcType=VARCHAR},</if>
@@ -61,7 +80,8 @@
      <if test="rule != null">#{rule,jdbcType=INTEGER},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.taoke.autopay.entity.ClientInfo">update table_user set `name` = #{name,jdbcType=VARCHAR},account = #{account,jdbcType=VARCHAR},pwd = #{pwd,jdbcType=VARCHAR},create_time = #{createTime,jdbcType=TIMESTAMP},active_time = #{activeTime,jdbcType=TIMESTAMP},rule = #{rule,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}</update>
    <update id="updateByPrimaryKey"
            parameterType="com.taoke.autopay.entity.ClientInfo">update table_user set `name` = #{name,jdbcType=VARCHAR},account = #{account,jdbcType=VARCHAR},pwd = #{pwd,jdbcType=VARCHAR},create_time = #{createTime,jdbcType=TIMESTAMP},active_time = #{activeTime,jdbcType=TIMESTAMP},rule = #{rule,jdbcType=INTEGER} where id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.taoke.autopay.entity.ClientInfo">update table_user
    <set>
      <if test="name != null">`name`=#{name,jdbcType=VARCHAR},</if>
@@ -70,16 +90,17 @@
      <if test="createTime != null">create_time=#{createTime,jdbcType=TIMESTAMP},</if>
      <if test="activeTime != null">active_time=#{activeTime,jdbcType=TIMESTAMP},</if>
      <if test="rule != null">rule=#{rule,jdbcType=INTEGER},</if>
    </set> where id = #{id,jdbcType=BIGINT}
        </set>
        where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="clearActiveTime" parameterType="java.lang.Long">update table_user
    <set>
      active_time = NULL
    </set> where id = #{id,jdbcType=BIGINT}
        </set>
        where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>