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
| <?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.example.server.user.dao.SysUserDao">
| <delete id="del">
| update sys_user
| set is_delete=1
| where id = #{id}
| </delete>
|
| <select id="getList" resultType="com.example.server.user.model.SysUser">
| SELECT
| a.user_id,
| a.user_name,
| a.nick_name,
| a.password,
| c.NAME AS dept,
| c.id AS deptId,
| b.id AS teamgroupId,
| b.Name AS teamgroup,
| d.name AS boatFleet,
| d.id AS boatFleetId
| FROM
| sys_user a
| LEFT JOIN
| dj_sys_teamgroup_class b ON b.id = a.teamgroup
| LEFT JOIN
| dj_sys_teamgroup_class c ON c.id = b.PID
| LEFT JOIN
| boat_fleet d ON d.id = a.boat_fleet
| WHERE
| a.is_delete = 0
| AND (b.is_delete = 0 OR b.id IS NULL)
| AND (c.is_delete = 0 OR c.id IS NULL)
| AND (d.is_delete = 0 OR d.id IS NULL);
| </select>
| <select id="login" resultType="com.example.server.user.model.SysUser">
| SELECT *,COUNT(*) > 0 as exist
| FROM sys_user
| WHERE user_name = #{name}
| AND password = #{password}
| and is_delete = 0;
| </select>
|
| </mapper>
|
|