<?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.neusoft.smart.pos.report.persistent.mapper.ManageableGroupMapper">
    <resultMap id="BaseResultMap" type="com.neusoft.smart.pos.report.persistent.domain.OrganizationGroup">
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="username" jdbcType="VARCHAR" property="username"/>
        <result column="password" jdbcType="VARCHAR" property="password"/>
        <result column="role" jdbcType="VARCHAR" property="role"/>
        <result column="org" jdbcType="INTEGER" property="org"/>

    </resultMap>
    <select id="selectByUserExample" parameterType="java.lang.Integer" resultType="com.neusoft.smart.pos.report.persistent.domain.OrganizationGroup">
#         SELECT
#             og.*
#         FROM
#             organization_group og,
#             organization_group og2,
#             organization_group_relation ogr
#         WHERE
#             og2.entity_table_id = ${value}
#             and og.id = ogr.parentid
#             and ogr.childid = og2.id
        SELECT * FROM organization_group WHERE entity_table_id = ${value}
    </select>


</mapper>