Browse Source

优化档案类型统计

master
xia 2 years ago
parent
commit
1a088e0c12
  1. 2
      archives/src/main/java/com/storeroom/modules/archives/repository/ArchivesSummaryRepository.java

2
archives/src/main/java/com/storeroom/modules/archives/repository/ArchivesSummaryRepository.java

@ -248,7 +248,7 @@ public interface ArchivesSummaryRepository extends JpaRepository<ArchivesSummary
Integer getArchivesNumByTpye(Integer type,Integer year);
@Query(nativeQuery = true,
value = "select count(1) from archives_summary where category_id in ?1 and if(?2 is null,1=1,DATE_FORMAT(create_time,'%Y-%m') = ?2)")
value = "select count(1) from archives_summary where category_id in ?1 and if(?2 is null,1=1,DATE_FORMAT(create_time,'%Y-%m') = ?2) and is_delete_time is null")
Integer getArchivesNumByCategoryIds(List categoryIds,String yearMonth);
@Query(nativeQuery = true,

Loading…
Cancel
Save