Quellcode durchsuchen

fix: 累充记录检查

wanggangzero vor 8 Monaten
Ursprung
Commit
190af5edda
1 geänderte Dateien mit 11 neuen und 11 gelöschten Zeilen
  1. 11 11
      Gameserver/App/process/PayProc.php

+ 11 - 11
Gameserver/App/process/PayProc.php

@@ -64,7 +64,7 @@ class PayProc {
                 return Resp::err(ErrCode::cmd_err);
         }
     }
-    
+
     /**
      * 8816 购买高级7日签到
      */
@@ -73,21 +73,21 @@ class PayProc {
         $mo = GameConfig::subfun_unlock_getItem(2);
         my_Assert($mo != null, ErrCode::err_const_no);
 
-        my_Assert(now() >= $mo->startTs && now()->$mo->endTs, ErrCode::active_time);       
+        my_Assert(now() >= $mo->startTs && now()->$mo->endTs, ErrCode::active_time);
         ctx()->privateState->sign_high_buyTs = now();
-        
+
         $startDay = TimeUtil::totalDays($mo->startTs);
         $curDay = TimeUtil::totalDays(now());
-        
+
         $n = $curDay - $startDay;
         $dic = GameConfig::activity_day7();
-        for ($i = 1; $i <= $n+1; $i++) {
-            if(StlUtil::dictHasProperty($dic, $i)){
-                ctx()->privateState->day7_drawed[] = $i."-2";
+        for ($i = 1; $i <= $n + 1; $i++) {
+            if (StlUtil::dictHasProperty($dic, $i)) {
+                ctx()->privateState->day7_drawed[] = $i . "-2";
                 StoreProc::AddMultiItemInStore(GameConfig::activity_day7_getItem($i)->reward_high);
             }
         }
-                          
+
         UserProc::updateUserInfo();
         return Resp::ok(array('gold' => ctx()->baseInfo->gold,
                     'cash' => ctx()->baseInfo->cash,
@@ -104,11 +104,11 @@ class PayProc {
      */
     static function accumulateRechargeRewardReceived() {
         list($id) = req()->paras;
-        $mo = GameConfig::accumulaterecharge_getItem($id);
+        $mo = GameConfig::accumulaterecharge_getItem($id);                      # 用yuanbao做的key
         my_Assert($mo != null, ErrCode::err_const_no);
 
         my_Assert(ctx()->baseInfo->accumulateYuanBao >= $id, ErrCode::pay_accumulateYuanBaoNotEnough);
-        my_Assert(in_array($id, ctx()->privateState->accumulateRechargeRewardRecord), ErrCode::pay_repeatReceive);
+        my_Assert(!in_array($id, ctx()->privateState->accumulateRechargeRewardRecord), ErrCode::pay_repeatReceive);
 
         ctx()->privateState->accumulateRechargeRewardRecord[] = $id;
         StoreProc::AddMultiItemInStore($mo->reward);
@@ -670,7 +670,7 @@ class PayProc {
                             'goods' => $item->goods, #                                  # 发货内容
                             'count' => $product_count, #                                # 发货数量
                         )
-        );
+                );
     }
 
     /**