概述
select id, cnname, sex, note, effective
from t_student where id = #{id}
select s.id, s.cnname, s.sex, s.note as snote,
if (sex = 1, shm.id, shf.id) as hid,
if (sex = 1, shm.check_date, shf.check_date) as check_date,
if (sex = 1, shm.heart, shf.heart) as heart,
if (sex = 1, shm.liver, shf.liver) as liver,
if (sex = 1, shm.spleen, shf.spleen) as spleen,
if (sex = 1, shm.lung, shf.lung) as lung,
if (sex = 1, shm.kidney, shf.kidney) as kidney,
if (sex = 1, shm.note, shf.note) as shnote,
shm.prostate, shf.uterus,
ss.id as ss_ssid, ss.student_id as ss_student_id, ss.native as ss_native_,
ss.issue_date as ss_issue_date, ss.end_date as ss_end_date, ss.note as ss_ssnote,
sl.id as slid,
sl.lecture_id, sl.grade, sl.note as slnote,
l.lecture_name, l.note as lnote
from t_student s
left join t_student_health_male shm on s.id = shm.student_id
left join t_student_health_female shf on s.id = shf.student_id
left join t_student_selfcard ss on s.id = ss.student_id
left join t_student_lecture sl on s.id = sl.student_id
left join t_lecture l on sl.lecture_id = l.id
{ call getStudentAndStudentSelfcard(#{studentId, jdbcType=INTEGER, mode=IN}) }
最后
以上就是过时哈密瓜为你收集整理的mysql resultmap int_MyBatis ResultMap 学习笔记的全部内容,希望文章能够帮你解决mysql resultmap int_MyBatis ResultMap 学习笔记所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复