xuhy
2026-01-13 05f45c0cfea4877c5b8c1981fc71452c4405d671
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
<?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.THelpNeedsMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.system.model.THelpNeeds">
        <id column="id" property="id" />
        <result column="app_user_id" property="appUserId" />
        <result column="nick_name" property="nickName" />
        <result column="contact_number" property="contactNumber" />
        <result column="requirement_description" property="requirementDescription" />
        <result column="pictures" property="pictures" />
        <result column="status" property="status" />
        <result column="user_id" property="userId" />
        <result column="process_person_name" property="processPersonName" />
        <result column="process_remark" property="processRemark" />
        <result column="process_pictures" property="processPictures" />
        <result column="process_time" property="processTime" />
        <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, nick_name, contact_number, requirement_description, pictures,
        status,user_id,process_person_name,process_remark,process_pictures,process_time,
          create_time, update_time, create_by, update_by, disabled
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.model.THelpNeeds">
        select t1.* from t_help_needs t1
        where 1=1
        <if test="query.nickName != null and query.nickName != ''">
            and t1.nick_name like concat('%',#{query.nickName},'%')
        </if>
        <if test="query.contactNumber != null and query.contactNumber != ''">
            and t1.contact_number like concat('%',#{query.contactNumber},'%')
        </if>
        <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
            and t1.create_time between #{query.startTime} and #{query.endTime}
        </if>
        AND t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        order by t1.create_time desc
    </select>
    <select id="exportHelpNeeds" resultType="com.ruoyi.system.export.THelpNeedsExport">
        select t1.* from t_help_needs t1
        where 1=1
        <if test="query.nickName != null and query.nickName != ''">
            and t1.nick_name like concat('%',#{query.nickName},'%')
        </if>
        <if test="query.contactNumber != null and query.contactNumber != ''">
            and t1.contact_number like concat('%',#{query.contactNumber},'%')
        </if>
        <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''">
            and t1.create_time between #{query.startTime} and #{query.endTime}
        </if>
        AND t1.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        order by t1.create_time desc
    </select>
 
</mapper>