浏览代码

修复手机端没有支付,捐款总金额也增加的bug

scr 8 年之前
父节点
当前提交
128501d75d
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      donate-service/src/main/java/com/uas/service/donate/dao/ProjectRecodeDao.java

+ 5 - 5
donate-service/src/main/java/com/uas/service/donate/dao/ProjectRecodeDao.java

@@ -13,15 +13,15 @@ import java.util.List;
 public interface ProjectRecodeDao extends JpaRepository<ProjectRecode,Long>,JpaSpecificationExecutor<ProjectRecode>{
 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);
     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);
     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);
     Double sumMoney(@Param("uuid")Long uuid);
 
 
     //查询所有项目已筹集金额
     //查询所有项目已筹集金额
@@ -33,11 +33,11 @@ public interface ProjectRecodeDao extends JpaRepository<ProjectRecode,Long>,JpaS
     Long historyPerson();
     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);
     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);
     Double sumamount(@Param("proId")Long proId);
 
 
     List<ProjectRecode> findByProId(Long proId);
     List<ProjectRecode> findByProId(Long proId);