You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
virtual-patient/virtual-patient-model/src/main/resources/mapper/DiseaseTreatmentPlanMapper.xml

48 lines
2.3 KiB
XML

<?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">
1 year ago
<mapper namespace="com.supervision.mapper.DiseaseTreatmentPlanMapper">
1 year ago
<resultMap id="BaseResultMap" type="com.supervision.model.DiseaseTreatmentPlan">
1 year ago
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="diseaseId" column="disease_id" jdbcType="VARCHAR"/>
<result property="planId" column="plan_id" jdbcType="VARCHAR"/>
<result property="createUserId" column="create_user_id" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateUserId" column="update_user_id" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
1 year ago
id
,disease_id,plan_id,create_user_id,
create_time,update_user_id,update_time
</sql>
<resultMap id="queryListByDiseaseIdResultMap" type="com.supervision.vo.manage.DiseaseTreatmentPlanResVo">
<result property="diseaseId" column="disease_id" jdbcType="VARCHAR"/>
<result property="planId" column="planId" jdbcType="VARCHAR"/>
<result property="disposalPlan" column="disposalPlan" jdbcType="VARCHAR"/>
<result property="disposalMethod" column="disposalMethod" jdbcType="VARCHAR"/>
<result property="secondMeasures" column="secondMeasures" jdbcType="VARCHAR"/>
<result property="recommendedMedication" column="recommendedMedication" jdbcType="ARRAY" typeHandler="com.supervision.handler.StringListTypeHandler"/>
</resultMap>
<select id="queryListByDiseaseId" resultMap="queryListByDiseaseIdResultMap">
select
dtp.id as id,
dtp.disease_id as diseaseId,
ctp.disposal_plan as disposalPlan,
ctp.disposal_method as disposalMethod,
ctp.first_measures as firstMeasures,
ctp.second_measures as secondMeasures,
ctp.recommended_medication as recommendedMedication
from vp_disease_treatment_plan dtp
left join vp_config_treatment_plan ctp on dtp.plan_id = ctp.id
where dtp.disease_id = #{diseaseId}
</select>
</mapper>