yaowanxin
14 小时以前 a6249b972f4b929e070ace0517da5b44f5d96be2
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
<?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.collaborativeApproval.mapper.RulesRegulationsManagementMapper">
    <resultMap id="RulesRegulationsManagementDTOMap" type="com.ruoyi.collaborativeApproval.dto.RulesRegulationsManagementDTO">
        <!-- 其他字段映射(保持不变) -->
        <result column="id" property="id"/>
        <result column="regulation_num" property="regulationNum"/>
        <result column="title" property="title"/>
        <!-- ... 省略其他字段 ... -->
 
        <!-- 关键修复:为 scope 字段指定类型处理器 -->
        <result column="scope" property="scope" typeHandler="com.ruoyi.approve.utils.ListToStringTypeHandler"/>
    </resultMap>
 
    <select id="listPage" resultMap="RulesRegulationsManagementDTOMap">
        select rrm.*, su.user_name as create_user_name
        from rules_regulations_management rrm
        left join sys_user su on rrm.create_user = su.user_id
        <where>
            <if test="ew.regulationNum != null and ew.regulationNum != ''">
                and rrm.regulation_num = #{ew.regulationNum}
            </if>
            <if test="ew.title != null and ew.title != ''">
                and rrm.title like concat('%',#{ew.title},'%')
            </if>
            <if test="ew.category != null">
                and rrm.category = #{ew.category}
            </if>
        </where>
    </select>
</mapper>