xuhy
2026-03-27 0923c2a6f1a7b4d28e39f566f9ff27557e2bf250
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
66
67
68
69
70
71
72
73
74
75
76
77
<?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.ruoyi.system.mapper.TMicroWishMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TMicroWish">
        <id column="id" property="id" />
        <result column="app_user_id" property="appUserId" />
        <result column="wish_type" property="wishType" />
        <result column="wish_description" property="wishDescription" />
        <result column="pictures" property="pictures" />
        <result column="contact_person" property="contactPerson" />
        <result column="contact_phone" property="contactPhone" />
        <result column="address" property="address" />
        <result column="status" property="status" />
        <result column="audit_remark" property="auditRemark" />
        <result column="process_result" property="processResult" />
        <result column="process_pictures" property="processPictures" />
        <result column="process_time" property="processTime" />
        <result column="user_name" property="userName" />
        <result column="id_card" property="idCard" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
        <result column="create_by" property="createBy" />
        <result column="update_by" property="updateBy" />
        <result column="disabled" property="disabled" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, app_user_id, wish_type, wish_description, pictures, contact_person, contact_phone, address, status, audit_remark,
          process_result, process_pictures, process_time,user_name, id_card, create_time, update_time, create_by, update_by, disabled
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.TMicroWishVO">
        select
        <include refid="Base_Column_List"/>
            from t_micro_wish
        <where>
            <if test="query.wishType != null">
                and wish_type = #{query.wishType}
            </if>
            <if test="query.status != null">
                and status = #{query.status}
            </if>
            <if test="query.contactPerson != null and query.contactPerson != ''">
                and contact_person like concat('%',#{query.contactPerson},'%')
            </if>
            <if test="query.contactPhone != null and query.contactPhone != ''">
                and contact_phone like concat('%',#{query.contactPhone},'%')
            </if>
            AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY create_time DESC
    </select>
    <select id="exportMicroWish" resultType="com.ruoyi.system.export.TMicroWishExport">
        select
        <include refid="Base_Column_List"/>
        from t_micro_wish
        <where>
            <if test="query.wishType != null">
                and wish_type = #{query.wishType}
            </if>
            <if test="query.status != null">
                and status = #{query.status}
            </if>
            <if test="query.contactPerson != null and query.contactPerson != ''">
                and contact_person like concat('%',#{query.contactPerson},'%')
            </if>
            <if test="query.contactPhone != null and query.contactPhone != ''">
                and contact_phone like concat('%',#{query.contactPhone},'%')
            </if>
            AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        </where>
        ORDER BY create_time DESC
    </select>
 
</mapper>