WorkToolAccountMapper.xml 1.5 KB
<?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>