liusheng
2025-12-28 73f5b82df781d2b061ba24d29182f6898b5535d9
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
<?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.project.mapper.VUserOrgMapper">
 
    <resultMap type="com.ruoyi.project.domain.VUserOrg" id="VUserOrgResult">
        <result property="userId" column="user_id"/>
        <result property="status" column="status"/>
        <result property="userName" column="user_name"/>
        <result property="nickName" column="nick_name"/>
        <result property="userType" column="user_type"/>
        <result property="phonenumber" column="phonenumber"/>
        <result property="deptId" column="dept_id"/>
        <result property="orgId" column="org_id"/>
        <result property="organizationid" column="OrganizationID"/>
        <result property="organizationname" column="OrganizationName"/>
        <result property="coordinatorNo" column="coordinator_no"/>
        <result property="coordinatorName" column="coordinator_name"/>
    </resultMap>
 
    <sql id="selectVUserOrgVo">
        select user_id,
               status,
               user_name,
               nick_name,
               user_type,
               phonenumber,
               dept_id,
               org_id,
               OrganizationID,
               OrganizationName,
               coordinator_no,
               coordinator_name
        from v_user_org
    </sql>
 
    <select id="selectVUserOrgList" parameterType="com.ruoyi.project.domain.VUserOrg" resultMap="VUserOrgResult">
        <include refid="selectVUserOrgVo"/>
        <where>
            <if test="userId != null ">and user_id = #{userId}</if>
            <if test="status != null  and status != ''">and status = #{status}</if>
            <if test="userName != null  and userName != ''">and user_name like concat('%', #{userName}, '%')</if>
            <if test="nickName != null  and nickName != ''">and nick_name like concat('%', #{nickName}, '%')</if>
            <if test="userType != null  and userType != ''">and user_type = #{userType}</if>
            <if test="phonenumber != null  and phonenumber != ''">and phonenumber = #{phonenumber}</if>
            <if test="deptId != null ">and dept_id = #{deptId}</if>
            <if test="orgId != null ">and org_id = #{orgId}</if>
            <if test="organizationid != null  and organizationid != ''">and OrganizationID = #{organizationid}</if>
            <if test="organizationname != null  and organizationname != ''">and OrganizationName like concat('%',
                #{organizationname}, '%')
            </if>
            <if test="coordinatorNo != null  and coordinatorNo != ''">and coordinator_no = #{coordinatorNo}</if>
            <if test="coordinatorName != null  and coordinatorName != ''">and coordinator_name like concat('%',
                #{coordinatorName}, '%')
            </if>
        </where>
    </select>
 
</mapper>