赞
踩
<mapper namespace="com.project.main.excel.out.mapper.WorkersOutMapper"> <resultMap type="com.project.main.excel.out.entity.WorkersVO" id="WorkersVOResultMap"> <result property="cardNum" column="card_num"/> <result property="workerName" column="worker_name"/> <result property="age" column="age"/> <result property="sex" column="sex"/> <result property="address" column="address"/> <result property="position" column="position"/> <result property="workDate" column="work_date"/> </resultMap> <select id="getWorkersToExcelOut" resultMap="WorkersVOResultMap"> SELECT card_num,worker_name,age,sex,address,position,work_date FROM data.workers_data_df </select> </mapper>
resultMap type | id |
---|---|
实体类所在位置 | 自定义唯一标识id |
result property | column |
---|---|
实体类对应字段名 | 数据库对应字段名 |
select id | resultMap |
---|---|
接口类对应id | 映射返回参数 |
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。