优化时间戳

master
chenzhi 5 years ago
parent b3f2069e94
commit f6f47748bc

3
.gitignore vendored

@ -5,4 +5,5 @@ Application/Common/Conf/env.php
Application/Common/Conf/pay_config.php Application/Common/Conf/pay_config.php
Application/Sdk/OrderNo/ Application/Sdk/OrderNo/
.idea/ .idea/
Uploads/ Uploads/
.vscode

@ -138,8 +138,9 @@ class FinanceController extends ThinkController
$this->error('月份不能为空'); $this->error('月份不能为空');
} }
$startTime = strtotime(date("Y-m-01",strtotime($month))); $tarry = explode('-',$month);
$endTime = strtotime(date("Y-m-t",strtotime($month))); $startTime=mktime(0,0,0,$tarry[1],1,$tarry[0]);
$endTime =mktime(0,0,0,$tarry[1]-0+1,1,$tarry[0])-1;
$map['pay_time'] = array('between',array($startTime,$endTime)); $map['pay_time'] = array('between',array($startTime,$endTime));
$map['pay_status'] = 1; $map['pay_status'] = 1;

Loading…
Cancel
Save