public interface RawProductEvaluationEventDao
{
public List<ProductEvaluationEvent> getEventsByTypeAndProductEvaluation(
@Param("evaluation") ProductEvaluation evaluation,
@Param("eventType") EventType eventType);
}
这是我的mapper xml RawProductEvaluationEventDao.xml
<select id="getEventsByTypeAndProductEvaluation" resultType="ProductEvaluationEvent">
SELECT
id,
productEvaluationFk,
eventTimestamp,
receiptEventTypeFk,
isStartEvent,
isSuccess,
supplementalEventText,
exceptionStackTraceText
FROM
productEvaluationEvent
WHERE productEvaluationFk = #{evaluation.id}
AND receiptEventTypeFk = #{eventType.id}
</select>
我添加了记录器,发现我为evaluate.id&amp; eventType.id
14:47:39 DEBUG c.r.w.p.d.r.R.getEventsByTypeAndProductEvaluation - ==> Preparing: SELECT id, productEvaluationFk, eventTimestamp, receiptEventTypeFk, isStartEvent, isSuccess, supplementalEventText, exceptionStackTraceText FROM productEvaluationEvent WHERE productEvaluationFk = ? AND receiptEventTypeFk = ?
14:47:39 DEBUG c.r.w.p.d.r.R.getEventsByTypeAndProductEvaluation - ==> Parameters: null, null