You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.3 KiB
39 lines
1.3 KiB
<?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.ccsens.tcm.persist.dao.DoctorDao">
|
|
|
|
|
|
<select id="queryDetail" resultType="com.ccsens.tcm.bean.vo.DoctorVo$Detail">
|
|
SELECT
|
|
d.id,
|
|
d.name,
|
|
d.user_id AS userId,
|
|
d.hospital_id AS hospitalId,
|
|
h.CODE AS hospitalCode,
|
|
h.NAME AS hospitalName,
|
|
h.hospital_type AS hospitalType
|
|
FROM
|
|
t_doctor d,
|
|
t_hospital h
|
|
WHERE
|
|
d.hospital_id = h.id
|
|
AND d.user_id = #{userId}
|
|
AND d.rec_status = 0
|
|
AND h.rec_status = 0
|
|
</select>
|
|
<select id="querySimple" resultType="com.ccsens.tcm.bean.vo.DoctorVo$Simple">
|
|
SELECT
|
|
id, name
|
|
FROM
|
|
t_doctor
|
|
WHERE
|
|
role = #{param.role}
|
|
<if test="param.authority == 1">
|
|
AND hospital_id IN ( SELECT hospital_id FROM t_doctor WHERE user_id = #{userId} AND rec_status = 0 )
|
|
</if>
|
|
<if test="param.hospitalId != null and param.hospitalId != 0">
|
|
AND hospital_id = #{param.hospitalId}
|
|
</if>
|
|
AND rec_status = 0
|
|
</select>
|
|
</mapper>
|