springframework.dao.EmptyResultDataAccessException
在尝试从 sql server 数据库中选择数据时,这是我编写的代码。有人可以建议如何使用查询界面从数据库中选择数据吗?
public int getRedempRequestId(RedemptionResponseBean redemptionResponse)
throws ParseException {
final Timestamp redempIdFromCsv = getRedeemDate(redemptionResponse);
int participantId = redemptionResponse.getOcpEventMemberId();
System.out.println(redempIdFromCsv);
System.out.println(participantId);
int res = jdbcTemplate.queryForInt("SELECT RR.REDEMPTION_REQUEST_ID "
+ "FROM dbo.REDEMPTION_REQUEST RR WITH (NOLOCK)"
+ "WHERE RR.SENT_DATE = ? AND "
+ "RR.OEDEF_OCP_EVENT_MEMBER_ID = ? ", new Object[] {
redempIdFromCsv, participantId });
System.out.println(res+"-----------");
return res;
}
谁能告诉我这里有什么问题?