@ -182,4 +182,8 @@ public interface BorrowArchivesRepository extends JpaRepository<BorrowArchives,
value="select count(1) from borrow_archives t1 inner join (select ba.archives_id,max(ba.update_time) as update_time from borrow_archives ba group by ba.archives_id) t2 on t1.archives_id = t2.archives_id and t1.update_time = t2.update_time where t1.borrow_type = -1")
IntegergetAbnormalNum();
@Query(nativeQuery=true,
value="select count(1) from borrow_archives where if(?1=1,if(?2=1,to_days(start_time)=to_days(now()),to_days(end_time)=to_days(now())),if(?2=1,date_format(start_time,'%Y%m')=date_format(curdate(),'%Y%m'),date_format(end_time,'%Y%m')=date_format(curdate(),'%Y%m')))")