<?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="com.casic.missiles.mapper.resource.BizResourceSoftwareReviewReportStaffMapper"> <!-- 通用查询映射结果 --> <resultMap id="BaseResultMap" type="com.casic.missiles.model.resource.BizResourceSoftwareReviewReportStaff"> <id column="id" property="id" /> <result column="report_id" property="reportId" /> <result column="staff_id" property="staffId" /> </resultMap> <!-- 通用查询结果列 --> <sql id="Base_Column_List"> id, report_id, staff_id </sql> <select id="selectStaffListByReportId" resultMap="BaseResultMap"> SELECT brsrrs.*, brsi.staff_name, brsi.title_experience, brsi.staff_no, brsi.dept_name FROM biz_resource_software_review_report_staff brsrrs JOIN biz_resource_staff_info brsi ON brsrrs.staff_id = brsi.id WHERE brsrrs.report_id = #{reportId} </select> </mapper>