<resultMap type="com.tsy.springmvc.model.system.Employee" id="ClassResultMap">
<id property="employeetID" column="employee.employeeID"/>
<result property="employeetName" column="employee.employeeName"/>
<result property="depatmentID" column="department.departmentID"/>
<result property="departmentName" column="department.departmentName"/>
</resultMap>
<select id="selectALLEmployee" resultMap="ClassResultMap">
select employee.employeeID, employee.employeeName, department.departmentID, department.departmentName
from employee, department
where employee.departmentID = department.departmentID
</select>结果已经映射,但是Controller控制层怎么获取这个 List<Employee>是在对应的Service提供方法,Impl实现嘛? 怎么实现?
<id property="employeetID" column="employee.employeeID"/>
<result property="employeetName" column="employee.employeeName"/>
<result property="depatmentID" column="department.departmentID"/>
<result property="departmentName" column="department.departmentName"/>
</resultMap>
<select id="selectALLEmployee" resultMap="ClassResultMap">
select employee.employeeID, employee.employeeName, department.departmentID, department.departmentName
from employee, department
where employee.departmentID = department.departmentID
</select>结果已经映射,但是Controller控制层怎么获取这个 List<Employee>是在对应的Service提供方法,Impl实现嘛? 怎么实现?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货