Files
yuaihealth/common/target/classes/mapper/JointMapper.xml
T

26 lines
1005 B
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">
<mapper namespace="cn.unizk.mapper.JointMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="cn.unizk.entity.po.Joint">
<id column="id" property="id" />
<result column="joint_name" property="jointName" />
<result column="ico_url" property="icoUrl" />
</resultMap>
<resultMap id="JointVOMap" type="cn.unizk.entity.vo.JointVO" extends="BaseResultMap">
<collection property="areas" ofType="cn.unizk.entity.po.PhysioThirteenArea">
<id column="areaId" property="id" />
<result column="area_name" property="areaName" />
</collection>
</resultMap>
<select id="selectJointVOList" resultMap="JointVOMap">
select j.id,j.joint_name,p.id as areaId,p.area_name from joint j join physio_thirteen_area p on j.id = p.type
</select>
</mapper>