本人开发新手,今天在调试别人开发的代码中,发现了一个现象,搜索了很多资料也没有查明白是为什么,简单记录一下。
mapper层
List<AttendanceClassManageEntity> selectAttendanceClassManagePage(IPage page, @Param("params") Map<String, Object> params);
xml中
<select id="selectAttendanceClassManagePage" resultType="com.paas.modules.attendance.entity.AttendanceClassManageEntity">
SELECT * FROM ( SELECT
T.ID,
T.STATUS,
FROM ATTENDANCE_CLASS_MANAGE T left join campus_student s on t.id = s.duty_class_id
<where>
<include refid="authSql"/>
</where>
group by T.create_date) AS Y ORDER BY length(Y.GRADE),Y.GRADE ASC,Y.CREATE_DATE ASC
</select>
include引用的代码片段id为“authSql”,但这个字段是mapper层传入参数Params对象中的一个字段。
include标签可以直接接收传入对象的字段吗?有没有大佬可以解释一下。