WorkToolAccountMapper.xml
1.5 KB
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
<?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="cn.com.glsx.entmicro.mapper.WorkToolAccountMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.entmicro.model.WorkToolAccount">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="robotId" jdbcType="VARCHAR" property="robotid" />
<result column="cloudId" jdbcType="VARCHAR" property="cloudid" />
<result column="online_flag" jdbcType="TINYINT" property="onlineFlag" />
<result column="robot_name" jdbcType="VARCHAR" property="robotName" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, robotId, cloudId, online_flag, robot_name
</sql>
<select id="findRootInfo" resultMap="BaseResultMap">
select <include refid="Base_Column_List"/>
from worktool_account
where cloudId = #{senderId}
</select>
<select id="findAllRobot" resultType="java.util.Map">
select t1.robotId,t2.staff_name as staffName
from worktool_account t1
left join entmicro_staff t2 on t1.cloudId=t2.id_bef_encryption
group by t1.robotId
</select>
<select id="findRootId" resultType="java.lang.String">
select robotId
from worktool_account
where cloudId = #{senderId}
</select>
</mapper>