提交 649520a5 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码 [Spring Boot,采购]

上级 d48c3357
......@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Hr_leave_reportResultMap" databaseId="postgresql">
<![CDATA[select * from hr_leave_report t1 where id=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.CATEGORY_ID, t21.NAME AS CATEGORY_ID_TEXT, t1.DATE_FROM, t1.DATE_TO, t1.DEPARTMENT_ID, t51.NAME AS DEPARTMENT_ID_TEXT, t1.EMPLOYEE_ID, t41.NAME AS EMPLOYEE_ID_TEXT, t1.HOLIDAY_STATUS_ID, t11.NAME AS HOLIDAY_STATUS_ID_TEXT, t1.HOLIDAY_TYPE, t1.ID, t1.NAME, t1.NUMBER_OF_DAYS, t1.PAYSLIP_STATUS, t1.STATE, t1.TYPE FROM HR_LEAVE_REPORT t1 LEFT JOIN HR_LEAVE_TYPE t11 ON t1.HOLIDAY_STATUS_ID = t11.ID LEFT JOIN HR_EMPLOYEE_CATEGORY t21 ON t1.CATEGORY_ID = t21.ID LEFT JOIN HR_EMPLOYEE t31 ON t1.EMPLOYEE_ID = t31.ID LEFT JOIN RESOURCE_RESOURCE t41 ON t31.RESOURCE_ID = t41.ID LEFT JOIN HR_DEPARTMENT t51 ON t1.DEPARTMENT_ID = t51.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册