forked from gzzfw/backEnd/gz-dyh

wangwh
2024-08-28 b47d4a7accabce974e19d2a1ffb3c5c67507d74b
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
<?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">
<!--
 * @title: 客户用户账号表
 * @description: 自定义sql,请自行实现业务逻辑
 * @company: hugeinfo
 * @author: liyj
 * @time:2024-08-17 15:30:56
 * @version 1.0.0
-->
<mapper namespace="cn.huge.module.sync.dao.mapper.SyncMapper">
 
    <resultMap id="dataResult" type="cn.huge.module.sync.domain.source.SourceCtAccount">
        <result property="id" column="id"/>
        <result property="userId" column="user_id"/>
        <result property="accType" column="acc_type"/>
        <result property="acc" column="acc"/>
        <result property="cipher" column="cipher"/>
        <result property="cipherOpen" column="cipher_open"/>
        <result property="cipherTime" column="cipher_time"/>
        <result property="loginTime" column="login_time"/>
        <result property="limitTime" column="limit_time"/>
        <result property="deleteStatus" column="delete_status"/>
        <result property="custId" column="cust_id"/>
        <result property="createTime" column="create_time"/>
        <result property="updateTime" column="update_time"/>
    </resultMap>
 
    <!--  根据条件分页查询  -->
    <select id="pageInfo" resultMap = "dataResult">
        SELECT
        *
        FROM
        ${mysqlTableName}
        <if test="page.sort != null">
            <foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
                ${s.property} ${s.direction}
            </foreach>
        </if>
        <if test="page.sort == null">
            order by create_time asc
        </if>
        limit #{page.offset}, #{page.size}
    </select>
 
    <!--  根据条件分页查询  -->
    <select id="countData" resultType="int">
        SELECT
        count(1)
        FROM
        ${mysqlTableName}
    </select>
</mapper>