//----------------------------------------------------------------------18-10-19编辑-------------------------------------------------------------------------------
开发过程中发现这个方法,不能返回简历的ID,即resId,想要获取需要再写一个:res.id resid ,不知道是什么原因。谁知道可以回复一下。
//----------------------------------------------------------------------------------------------------------------------------------------------------------------------
<!--
项目中需要查询简历详情信息,简历中包含工作经验和教育经历,这都是集合,查询结果使用ModelMap接收,
建立详情映射结果
-->
<resultMap id="ResumeInfoMap" type="org.springframework.ui.ModelMap">
<collection property="userJobExps" column="resId" select="userJobExps"></collection>
<collection property="userEduExps" column="resId" select="userEduExps"></collection>
</resultMap>
<!-- 简历详情 -->
<select id="getResumeByID" parameterType="int" resultMap="ResumeInfoMap">
select res.id resId,res.truename trueName,res.sex sex,res.mobile mobile,res.email email,
res.birthday birthday,res.education edu,res.exp_year years,res.wish_job wishJob,
res.wish_wage wishWage,res.selfintroduction selfDesc
from tb_user_resume res
where res.id = #{resId}
</select>
<!-- 工作经验 -->
<select id="userJobExps" parameterType="int" resultType="org.springframework.ui.ModelMap">
select exp.begin_date beginDate,exp.end_date endDate,exp.mac_nm mchName,
exp.major_nm major
from tb_user_exp exp
where exp.resume_id=#{resId} and exp.exp_type=2
order by exp.begin_date desc
</select>
<!-- 教育经历 -->
<select id="userEduExps" parameterType="int" resultType="org.springframework.ui.ModelMap">
select exp.begin_date beginDate,exp.end_date endDate,exp.mac_nm mchName,
exp.major_nm major
from tb_user_exp exp
where exp.resume_id=#{resId} and exp.exp_type=2
order by exp.begin_date desc
</select>