|
|
|
@ -53,11 +53,12 @@ class StatementWarningController extends AdminController
|
|
|
|
|
|
|
|
|
|
private function getLastUpdate()
|
|
|
|
|
{
|
|
|
|
|
$preMonth = explode('-',date('Y-m',mktime(0,0,0,date('m',time()),1,date('Y',time()))-1));
|
|
|
|
|
$time =strtotime(date('Y',time()).'-'.date('m',time())."-1");
|
|
|
|
|
$nextMonth = explode('-', date('Y-m',strtotime('+32 day',$time)) );
|
|
|
|
|
|
|
|
|
|
$lastUpdate = $this->statementWarningModel->where([
|
|
|
|
|
'count_year'=>$preMonth[0],
|
|
|
|
|
'count_month'=>$preMonth[1],
|
|
|
|
|
'count_year'=>$nextMonth[0],
|
|
|
|
|
'count_month'=>$nextMonth[1],
|
|
|
|
|
"name"=>'wm_platm',
|
|
|
|
|
"type"=>1
|
|
|
|
|
])->field("create_time")->find();
|
|
|
|
@ -308,8 +309,8 @@ class StatementWarningController extends AdminController
|
|
|
|
|
{
|
|
|
|
|
if(!isset($_REQUEST['time'])) $this->error("参数错误");
|
|
|
|
|
|
|
|
|
|
$time =strtotime($_REQUEST['time']."-1");
|
|
|
|
|
$time = date('Y-m',strtotime('+32 day',$time));
|
|
|
|
|
$time =strtotime($_REQUEST['time']."-1")-1;
|
|
|
|
|
$time = date('Y-m',$time);
|
|
|
|
|
|
|
|
|
|
$params = "php ".SUBSITE_INDEX." StatementWarningSet/setFreeMonth/count_date/{$time}";
|
|
|
|
|
$r = D("CmdTasks")->addTask("StatementWarningSet",$params);
|
|
|
|
@ -422,11 +423,12 @@ class StatementWarningController extends AdminController
|
|
|
|
|
$poolname = 'up_statement';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$preMonth = explode('-',date('Y-m',mktime(0,0,0,$info['count_month'],1,$info['count_year'])-1));
|
|
|
|
|
|
|
|
|
|
$time =strtotime($info['count_year'].'-'.$info['count_month']."-1");
|
|
|
|
|
$nextMonth = explode('-', date('Y-m',strtotime('+32 day',$time)) );
|
|
|
|
|
|
|
|
|
|
$this->statementWarningModel->where([
|
|
|
|
|
'count_year'=>$preMonth[0],
|
|
|
|
|
'count_month'=>$preMonth[1],
|
|
|
|
|
'count_year'=>$nextMonth[0],
|
|
|
|
|
'count_month'=>$nextMonth[1],
|
|
|
|
|
'name'=>$poolname,
|
|
|
|
|
])->setDec('money',$diffMoney);
|
|
|
|
|
}
|
|
|
|
|