buhuazhen
7 天以前 47768d890fbfc1a5f3e93ca26137847361415e9e
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
<?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.oA.mapper.OaProjectMapper">
 
 
    <select id="listPage" resultType="com.ruoyi.oA.dto.OaProjectDto">
        select op.*,su.nick_name as managerName from oa_project op
        LEFT JOIN sys_user su ON op.manager_id=su.user_id
        <where>
        1=1
            <if test="req.projectName != null and req.projectName != ''">
                and op.project_name like concat('%',#{req.projectName},'%')
            </if>
            <if test="req.managerName != null and req.managerName != ''">
                and su.nick_name like concat('%',#{req.managerName},'%')
            </if>
            <if test="req.status != null and req.status != ''">
                and op.status = #{req.status}
            </if>
        </where>
    </select>
    <select id="selectByIds" resultType="com.ruoyi.oA.dto.OaProjectDto">
        select op.*,su.nick_name as managerName from oa_project op
        LEFT JOIN sys_user su ON op.manager_id=su.user_id
        where op.project_id in
        <foreach collection="ids" item="id" open="(" close=")" separator=",">
            #{id}
        </foreach>
    </select>
</mapper>