| | |
| | | <result column="admin_user_id" property="adminUserId"/> |
| | | <result column="name" property="name"/> |
| | | <result column="province_code" property="provinceCode"/> |
| | | <result column="province_name" property="provinceName"/> |
| | | <result column="city_code" property="cityCode"/> |
| | | <result column="city_name" property="cityName"/> |
| | | <result column="area_code" property="areaCode"/> |
| | | <result column="town_code" property="townCode"/> |
| | | <result column="village_code" property="villageCode"/> |
| | | <result column="location_level" property="locationLevel"/> |
| | | <result column="area_name" property="areaName"/> |
| | | <result column="location_level_code" property="locationLevelCode"/> |
| | | <result column="location_level_name" property="locationLevelName"/> |
| | | <result column="address" property="address"/> |
| | | <result column="phone" property="phone"/> |
| | | <result column="email" property="email"/> |
| | |
| | | <result column="is_delete" property="isDelete"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectOrganizationById" resultType="java.util.Map"> |
| | | SELECT * FROM organization WHERE id= #{orgId} |
| | | <select id="orgIdList" resultType="java.lang.Integer"> |
| | | SELECT id FROM ( |
| | | SELECT id, parent_id, name FROM organization WHERE id = #{organizationId} |
| | | UNION ALL |
| | | SELECT i.id, i.parent_id, i.name |
| | | FROM organization i |
| | | INNER JOIN ( |
| | | SELECT * FROM ( |
| | | SELECT id, parent_id, name FROM organization WHERE id = #{organizationId} |
| | | UNION ALL |
| | | SELECT id, parent_id, name FROM organization WHERE parent_id = #{organizationId} |
| | | ) t1 |
| | | ) t2 ON i.parent_id = t2.id |
| | | where i.is_delete = 0 |
| | | ) t3 |
| | | </select> |
| | | <select id="orgIdSpecialDevList" resultType="java.lang.Integer"> |
| | | select organization_id from special_device where organization_id in ( |
| | | SELECT id FROM ( |
| | | SELECT id, parent_id, name FROM organization WHERE id = #{organizationId} |
| | | UNION ALL |
| | | SELECT i.id, i.parent_id, i.name |
| | | FROM organization i |
| | | INNER JOIN ( |
| | | SELECT * FROM ( |
| | | SELECT id, parent_id, name FROM organization WHERE id = #{organizationId} |
| | | UNION ALL |
| | | SELECT id, parent_id, name FROM organization WHERE parent_id = #{organizationId} |
| | | ) t1 |
| | | ) t2 ON i.parent_id = t2.id |
| | | where i.is_delete = 0 |
| | | ) t3 ) and mac = #{mac} and is_delete = 0 |
| | | |
| | | |
| | | </select> |
| | | </mapper> |