|
@@ -0,0 +1,21 @@
|
|
|
|
|
+<?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.tr.module.smart.common.repository.BizWxUserRepository">
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap id="stdWxUserBindHospitalResult" type="cn.tr.module.smart.wx.controller.vo.BizWxUserBindHospitalVO">
|
|
|
|
|
+ <result property="id" column="id"/>
|
|
|
|
|
+ <result property="name" column="name"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="allBindHospital" resultMap="stdWxUserBindHospitalResult">
|
|
|
|
|
+ select
|
|
|
|
|
+ bh.id as id,
|
|
|
|
|
+ bh.name as name
|
|
|
|
|
+ from biz_wx_user_hospital as bwuh
|
|
|
|
|
+ join biz_hospital as bh on bh.id = bwuh.tenant_id
|
|
|
|
|
+ where bwuh.user_id = #{userId}
|
|
|
|
|
+ order by bwuh.create_time desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </mapper>
|