无关风月
2025-05-08 9486766c806fe1d9e082b2fd02ea1cc558f1b443
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
<?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.dsh.account.mapper.RefereeMapper">
 
 
 
    <select id="getRefereeList" resultType="map">
        select
        id,
        name,
        phone,
        CONCAT(province, city) as province,
        state
        from t_referee where state != 3
        <if test="null != item.name and '' != item.name">
            and name like CONCAT('%', #{item.name}, '%')
        </if>
        <if test="null != item.phone and '' != item.phone">
            and phone like CONCAT('%', #{item.phone}, '%')
        </if>
        <if test="null != item.provinceCode and '' != item.provinceCode">
            and provinceCode = #{item.provinceCode}
        </if>
        <if test="null != item.cityCode and '' != item.cityCode">
            and cityCode = #{item.cityCode}
        </if>
        order by createTime desc limit #{item.offset}, #{item.limit}
    </select>
 
 
    <select id="getRefereeListCount" resultType="int">
        select
        count(*)
        from t_referee where state != 3
        <if test="null != item.name and '' != item.name">
            and name like CONCAT('%', #{item.name}, '%')
        </if>
        <if test="null != item.phone and '' != item.phone">
            and phone like CONCAT('%', #{item.phone}, '%')
        </if>
        <if test="null != item.provinceCode and '' != item.provinceCode">
            and provinceCode = #{item.provinceCode}
        </if>
        <if test="null != item.cityCode and '' != item.cityCode">
            and cityCode = #{item.cityCode}
        </if>
    </select>
</mapper>