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.
52 lines
1.8 KiB
52 lines
1.8 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.acupuncture.system.persist.dao.ExternalDao">
|
|
<select id="select" resultType="com.acupuncture.system.domain.vo.ExternalVo$Result"
|
|
parameterType="com.acupuncture.system.domain.dto.ExternalDto$Query">
|
|
select
|
|
t.visit_number as memberid,
|
|
t.name as name,
|
|
t.gender as sex,
|
|
t.birth_date as birthYear,
|
|
t.phone as phone,
|
|
t.tenant_id as gid
|
|
from
|
|
pms_treatment t
|
|
left join
|
|
pms_patient p on t.patient_id = p.id
|
|
<where>
|
|
t.del_flag = 0
|
|
<if test="query.memberid != null and query.memberid != ''">
|
|
and t.visit_number = #{query.memberid}
|
|
</if>
|
|
<if test="query.from != null and query.from != ''">
|
|
and t.tenant_id = #{query.from}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectByMemberId" resultType="com.acupuncture.system.domain.vo.ExternalVo$Result"
|
|
parameterType="com.acupuncture.system.domain.dto.ExternalDto$Query">
|
|
select
|
|
t.member_id as memberid,
|
|
t.name as name,
|
|
t.gender as sex,
|
|
t.birth_date as birthYear,
|
|
t.phone as phone,
|
|
t.tenant_id as gid
|
|
from
|
|
pms_treatment t
|
|
left join
|
|
pms_patient p on t.patient_id = p.id
|
|
<where>
|
|
t.del_flag = 0
|
|
<if test="query.memberid != null and query.memberid != ''">
|
|
and t.member_id = #{query.memberid}
|
|
</if>
|
|
<if test="query.from != null and query.from != ''">
|
|
and t.tenant_id = #{query.from}
|
|
</if>
|
|
</where>
|
|
</select>
|
|
|
|
</mapper>
|
|
|