无关风月
13 小时以前 7e8773c06d9391c94b7a0111b63d17cf5bdb6d8e
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
<?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.OaNotificationMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.system.model.OaNotification">
        <id column="id" property="id" />
        <result column="title" property="title" />
        <result column="content" property="content" />
        <result column="type" property="type" />
        <result column="create_time" property="createTime" />
        <result column="create_by" property="createBy" />
        <result column="update_time" property="updateTime" />
        <result column="update_by" property="updateBy" />
        <result column="disabled" property="disabled" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, title, content, type, create_time, create_by, update_time, update_by, disabled
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.system.NotificationVO">
        select * from oa_notification
        where 1=1
        <if test="query.title != null and query.title != ''">
            and title like concat('%',#{query.title},'%')
        </if>
        <if test="deptIds != null and deptIds.size() > 0">
            AND (
            <foreach collection="deptIds" item="deptId" separator=" OR ">
                FIND_IN_SET(#{deptId}, dept_ids)
            </foreach>
            )
        </if>
        AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()}
        order by  create_time desc
    </select>
 
</mapper>