|
|
@@ -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');
|
|
|
|
|
|
// 清除还有未消费爱心
|