feiyu02
2023-11-14 8f069a80ed15dd431450f58304513aa3985e62ba
src/main/java/com/flightfeather/monitor/domain/ds1/repository/RiskValueRep.kt
@@ -26,16 +26,27 @@
        }
    }
    /**
     * 插入列表
     * @param list
     */
    fun insert(list: List<RiskValue>): Int {
        return riskValueMapper.insertList(list)
    }
    fun select(mnCode: String, date: LocalDate): List<RiskValue?> {
    /**
     * 查询
     * @param mnCode
     * @param date
     * @param type
     */
    fun select(mnCode: String, date: LocalDate, type: String): List<RiskValue?> {
        val s = date.withDayOfMonth(1).atStartOfDay()
        val e = s.plusMonths(1).minusSeconds(1)
        return riskValueMapper.selectByExample(Example(RiskValue::class.java).apply {
            createCriteria().andEqualTo("mnCode", mnCode)
                .andBetween("lst", s, e)
                .andEqualTo("type", type)
        })
    }
}