|
|
@@ -13,15 +13,15 @@ import java.util.List;
|
|
|
public interface ProjectRecodeDao extends JpaRepository<ProjectRecode,Long>,JpaSpecificationExecutor<ProjectRecode>{
|
|
|
|
|
|
//查询某人参加过捐款的所有项目
|
|
|
- @Query("from ProjectRecode where uuid=:uuid")
|
|
|
+ @Query("from ProjectRecode where uuid=:uuid and status=2")
|
|
|
List<ProjectRecode> findByuuid(@Param("uuid") Long uuid);
|
|
|
|
|
|
//计算某人参与项目的次数
|
|
|
- @Query("select count(*) from ProjectRecode where uuid=:uuid")
|
|
|
+ @Query("select count(*) from ProjectRecode where uuid=:uuid and status=2")
|
|
|
Long sumJoin(@Param("uuid")Long uuid);
|
|
|
|
|
|
//计算某人捐赠的总善款
|
|
|
- @Query("select sum(amount) from ProjectRecode where uuid=:uuid")
|
|
|
+ @Query("select sum(amount) from ProjectRecode where uuid=:uuid and status=2")
|
|
|
Double sumMoney(@Param("uuid")Long uuid);
|
|
|
|
|
|
//查询所有项目已筹集金额
|
|
|
@@ -33,11 +33,11 @@ public interface ProjectRecodeDao extends JpaRepository<ProjectRecode,Long>,JpaS
|
|
|
Long historyPerson();
|
|
|
|
|
|
//查询某项目参与总人数
|
|
|
- @Query("select count(*) from ProjectRecode where proId=:proId")
|
|
|
+ @Query("select count(*) from ProjectRecode where proId=:proId and status=2 ")
|
|
|
Long sumPerson(@Param("proId")Long proId);
|
|
|
|
|
|
//查询某项目已筹集金额
|
|
|
- @Query("select sum(amount) from ProjectRecode where proId=:proId")
|
|
|
+ @Query("select sum(amount) from ProjectRecode where proId=:proId and status=2")
|
|
|
Double sumamount(@Param("proId")Long proId);
|
|
|
|
|
|
List<ProjectRecode> findByProId(Long proId);
|