优化更新时间

master
chenzhi 3 years ago
parent a8509393f3
commit 0b3e5032bb

@ -52,10 +52,12 @@ class StatementWarningController extends AdminController
} }
private function getLastUpdate() private function getLastUpdate()
{ {
$preMonth = explode('-',date('Y-m',mktime(0,0,0,date('m',time()),1,date('Y',time()))-1));
$lastUpdate = $this->statementWarningModel->where([ $lastUpdate = $this->statementWarningModel->where([
'count_year'=>$_REQUEST['year'], 'count_year'=>$preMonth[0],
'count_month'=>date('m',time()), 'count_month'=>$preMonth[1],
"name"=>'wm_platm', "name"=>'wm_platm',
"type"=>1 "type"=>1
])->field("create_time")->find(); ])->field("create_time")->find();

@ -183,7 +183,7 @@ class StatementWarningSetController extends Controller {
//获取官方渠道 //获取官方渠道
$merchantIds = M("payment_merchant","tab_")->group('main_id')->where("main_id = 1")->getField("GROUP_CONCAT(id) ids"); $merchantIds = M("payment_merchant","tab_")->group('main_id')->where("main_id = 1")->getField("GROUP_CONCAT(id) ids");
$where = [ $where = [
'merchant_way'=>['in',$merchantIds], 'merchant_id'=>['in',$merchantIds],
'pay_status'=>1, 'pay_status'=>1,
'payed_time'=>['between',[$this->beginThismonth,$this->endThismonth]], 'payed_time'=>['between',[$this->beginThismonth,$this->endThismonth]],
]; ];

Loading…
Cancel
Save