浏览代码

fix available_predeposit < bonus total

stanley-king 8 年之前
父节点
当前提交
422dc28429
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 1 1
      helper/model/goods_summary.php
  2. 5 0
      helper/predeposit_helper.php

+ 1 - 1
helper/model/goods_summary.php

@@ -12,7 +12,7 @@ class goods_summary
     private $goods_commonid;
     private $goods_info;
     private $bundles;
-    
+
     const new_goods_speriod = 10 * 3600 * 24;
     private $mStartTm;
 

+ 5 - 0
helper/predeposit_helper.php

@@ -269,6 +269,11 @@ class predeposit_helper
             $this->write_rates($this->mBonusState,$bonus_rate);
             $this->mRates->clean();
         }
+
+        if(intval($this->mTotalPred * 100 + 0.5) < intval($this->mRates->total() * 100 + 0.5)) {
+            $this->mTotalPred = $this->mRates->total();
+            Model('member')->editMember(array('member_id' => $this->member_id),array('available_predeposit' => $this->mTotalPred));
+        }
     }
 
     public function __destruct()