Explorar o código

wesmiler 更新第5期更新代码合并

wesmiler %!s(int64=4) %!d(string=hai) anos
pai
achega
e39f07a0d1
Modificáronse 2 ficheiros con 5 adicións e 5 borrados
  1. 2 2
      app/weixin/model/Member.php
  2. 3 3
      app/weixin/service/Member.php

+ 2 - 2
app/weixin/model/Member.php

@@ -2547,12 +2547,12 @@ class Member extends Model
                 // 签到后清除月份总消费
                 $totalCost = AccountLog::where(['user_id' => $userId, 'status' => 2, 'account_type' => 1, 'change_type' => 2])
                     ->where('created_at', '>=', $time)
-                    ->where('created_at', '<=', date('Y-m-01 02:00:00'))
+                    ->where('created_at', '<=', date('Y-m-01 01:00:00'))
                     ->sum('money');
 
                 $totalClearSign = AccountLog::where(['user_id' => $userId, 'type' => 12, 'status' => 2])
                     ->where('created_at', '>=', $time)
-                    ->where('created_at', '<=', date('Y-m-01 02:00:00'))
+                    ->where('created_at', '<=', date('Y-m-01 01:00:00'))
                     ->sum('money');
 
                 $clearRedheart = ($totalClearSign - $totalCost);

+ 3 - 3
app/weixin/service/Member.php

@@ -395,7 +395,7 @@ class Member
         // 最早
         $firstSign = AccountLog::where(['user_id'=> $userId,'type'=> 12,'status'=> 2])
             ->where('created_at','>=', $month)
-            ->where('created_at','<=', date('Y-m-01 02:00:00'))
+            ->where('created_at','<=', date('Y-m-01 01:00:00'))
             ->order('created_at','asc')
             ->find();
         $time = isset($firstSign['created_at'])? $firstSign['created_at'] : '';
@@ -407,13 +407,13 @@ class Member
         // 签到后总消费
         $totalCost = AccountLog::where(['user_id'=> $userId,'status'=> 2,'account_type'=> 1,'change_type'=>2])
             ->where('created_at','>=', $time)
-            ->where('created_at','<', date('Y-m-01 02:00:00'))
+            ->where('created_at','<', date('Y-m-01 01:00:00'))
             ->sum('money');
 
 
         $totalSign = AccountLog::where(['user_id'=> $userId,'type'=> 12,'status'=> 2])
             ->where('created_at','>=', $time)
-            ->where('created_at','<', date('Y-m-01 02:00:00'))
+            ->where('created_at','<', date('Y-m-01 01:00:00'))
             ->sum('money');
 
         // 清除还有未消费爱心