Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dongbw 8 years ago
parent
commit
8abe46123b

+ 58 - 0
donate-console/src/main/java/com/uas/console/donate/model/SmsMessage.java

@@ -3,6 +3,7 @@ package com.uas.console.donate.model;
 import java.util.List;
 
 public class SmsMessage {
+
     /**
      * 接收方电话
      */
@@ -18,6 +19,63 @@ public class SmsMessage {
      */
     private String templateId;
 
+    /**
+     * 活动名称
+     * @return
+     */
+    private String activityName;
+
+    /**
+     * 奖品等级
+     */
+    private String awardLeavel;
+
+
+    /**
+     * 中奖奖品
+     * @return
+     */
+    private String award;
+
+    /**
+     * 兑换码
+     * @return
+     */
+    private String redeemcode;
+
+
+    public String getActivityName() {
+        return activityName;
+    }
+
+    public void setActivityName(String activityName) {
+        this.activityName = activityName;
+    }
+
+    public String getAwardLeavel() {
+        return awardLeavel;
+    }
+
+    public void setAwardLeavel(String awardLeavel) {
+        this.awardLeavel = awardLeavel;
+    }
+
+    public String getAward() {
+        return award;
+    }
+
+    public void setAward(String award) {
+        this.award = award;
+    }
+
+    public String getRedeemcode() {
+        return redeemcode;
+    }
+
+    public void setRedeemcode(String redeemcode) {
+        this.redeemcode = redeemcode;
+    }
+
     public String getReceiver() {
         return receiver;
     }

+ 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>{
 
     //查询某人参加过捐款的所有项目
-    @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);