修复-1 month出现当月1号的问题

This commit is contained in:
kang 2023-05-31 14:34:32 +08:00
parent 63b31b933e
commit 1d416c44b0

View File

@ -128,7 +128,7 @@ class Transfer extends Auth
'total' => [
'锁定' => $locks,
'可提' => $total - $count,
'上月' => DataUserTransfer::mk()->where($map)->whereLike('date', date("Y-m-%", strtotime('-1 month')))->sum('amount'),
'上月' => DataUserTransfer::mk()->where($map)->whereLike('date', date("Y-m-%", strtotime('last day of -1 month')))->sum('amount'),
'本月' => DataUserTransfer::mk()->where($map)->whereLike('date', date("Y-m-%"))->sum('amount'),
'全年' => DataUserTransfer::mk()->where($map)->whereLike('date', date("Y-%"))->sum('amount'),
],