我是靠谱客的博主 过时哈密瓜,最近开发中收集的这篇文章主要介绍mysql resultmap int_MyBatis ResultMap 学习笔记,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

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 学习笔记所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(44)

评论列表共有 0 条评论

立即
投稿
返回
顶部