package com.zyh.factory.repositories;

import org.springframework.data.repository.CrudRepository;
import com.zyh.factory.entity.SourceEntity;

public interface SourceRepository extends CrudRepository<SourceEntity, Long> {

}
@@ -32,16 +32,94 @@
 ories;%0A%0A
+import java.util.List;%0A%0Aimport org.springframework.data.jpa.repository.Query;%0A
 import o
@@ -298,5 +298,164 @@
  %7B%0A%0A
-%7D
+%09@Query(%22select new map(count(v) as count, v.sourceStatus as label) from SourceEntity v group by v.sourceStatus%22)%0A%09public List%3C?%3E countGroupBySourceStatus();%0A%7D%0A

Update SourceRepository.java