liding
2026-10-24 f8c024b1c1de318a4de485e048d1044cd6dcaa53
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
<?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.process.mapper.ProcessMethodSearchNewMapper">
 
    <!-- 标准查新分页查询 -->
    <select id="pageMethodSearchNew" resultType="com.ruoyi.process.pojo.ProcessMethodSearchNew">
        select a.*,
               CASE WHEN a.search_new_time IS NOT NULL THEN
                   (select u.name from user u where u.id = a.search_new_user_id)
               END as searchNewUserName,
               COALESCE(a.next_search_date_override,
                        DATE_ADD(DATE(COALESCE(a.search_new_time, a.create_time)), INTERVAL 3 MONTH)) as nextSearchDate
        from (select *
        from cnas_process_method_search_new
        <where>
            and is_auto_archived = 0
            <if test="beginDate != null and beginDate != '' and endDate != null and endDate != ''">
                and create_time between #{beginDate} and #{endDate}
            </if>
        </where>
        order by create_time desc
        ) a
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
            ${ew.customSqlSegment}
        </if>
    </select>
 
</mapper>