|
@@ -0,0 +1,66 @@
|
|
|
|
|
+<?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.ydtech.modules.admin.dao.SysUserLinkSysMapper">
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap id="BaseResultMap" type="com.ydtech.modules.admin.model.po.SysUserLinkSys">
|
|
|
|
|
+ <id property="id" column="id" jdbcType="BIGINT"/>
|
|
|
|
|
+ <result property="sysId" column="sys_id" jdbcType="BIGINT"/>
|
|
|
|
|
+ <result property="userId" column="user_id" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result property="createUser" column="create_user" jdbcType="VARCHAR"/>
|
|
|
|
|
+ <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
|
|
|
+ <result property="updateUser" column="update_user" jdbcType="VARCHAR"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
|
+ id,sys_id,user_id,
|
|
|
|
|
+ create_time,create_user,update_time,
|
|
|
|
|
+ update_user
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="queryPage" resultType="com.ydtech.modules.admin.model.po.SysUserLinkSys">
|
|
|
|
|
+ select
|
|
|
|
|
+ link.id as id,
|
|
|
|
|
+ link.sys_id as sysId,
|
|
|
|
|
+ link.user_id as userId,
|
|
|
|
|
+ s.system_name as systemName,
|
|
|
|
|
+ su.name as userName
|
|
|
|
|
+ from sys_user_link_sys link
|
|
|
|
|
+ left join sys_sys s on s.id=link.sys_id
|
|
|
|
|
+ left join sys_user su on su.id =link.user_id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="vo.systemName != null and vo.systemName != ''">
|
|
|
|
|
+ AND s.system_name like CONCAT('%', #{vo.systemName}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.systemCode != null and vo.systemCode != ''">
|
|
|
|
|
+ AND s.system_name = #{vsystemCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.userName != null and vo.userName != ''">
|
|
|
|
|
+ AND su.name like CONCAT('%', #{vo.userName}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.userId != null and vo.userId != ''">
|
|
|
|
|
+ AND su.id = #{vo.userId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="queryUserPage" resultType="com.ydtech.modules.admin.model.SysUser">
|
|
|
|
|
+ select *
|
|
|
|
|
+ from sys_user su
|
|
|
|
|
+ <where>
|
|
|
|
|
+ su.status=1 and su.id !='admin'
|
|
|
|
|
+ <if test="vo.deptId != null and vo.deptId != ''">
|
|
|
|
|
+ AND su.dept_id like CONCAT('', #{vo.deptId}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.name != null and vo.name != ''">
|
|
|
|
|
+ AND su.name like CONCAT('%', #{vo.name}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="vo.userId != null and vo.userId != ''">
|
|
|
|
|
+ AND su.id = #{vo.userId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+</mapper>
|