日常总结
SQL查询,使用未过期方法
public String searchCreditNoPayDateByUserId(Long userId) { String sql = "select to_char(min(t2.repayment_date),'yyyy-mm-dd') from t_credit_info t1 join t_credit_detail t2 on t1.auto_id = t2.ci_id where t1.is_del = 'N' and t2.is_del = 'N' and t2.is_repayment = '0'"; ICondition condition = Condition.createAndCondition(); condition.eq("t1.user_id", userId); List<?> object = creditInfoDao.searchSql(condition, sql); if (null == object || object.size() != 1) { return null; } Object data = object.get(0); if (null == data) { return null; } return data.toString(); }