|
|
|
@ -757,7 +757,7 @@ class TimingController extends AdminController {
|
|
|
|
|
public function caculateMarketStream () {
|
|
|
|
|
echo date("Y-m-d H:i:s")."----------------------市场结算管理计算----------------------\n";
|
|
|
|
|
|
|
|
|
|
$map['pay_time'] = date("Y-m",strtotime('-1 month'));
|
|
|
|
|
$map['pay_time'] = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01'));
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['time']) {
|
|
|
|
|
$map['pay_time'] = $_REQUEST['time'];
|
|
|
|
@ -765,7 +765,7 @@ class TimingController extends AdminController {
|
|
|
|
|
$spend_map = [];
|
|
|
|
|
if($_REQUEST['time'] == 'all') {
|
|
|
|
|
$map = [];
|
|
|
|
|
$spend_map['pay_time'] = ['elt',strtotime(date('Y-m-t 23:59:59', strtotime('-1 month')))];
|
|
|
|
|
$spend_map['pay_time'] = ['elt',strtotime(date('Y-m-t 23:59:59', strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01')))];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$data = M("auth_group")
|
|
|
|
@ -971,8 +971,8 @@ class TimingController extends AdminController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!$pay_time) {
|
|
|
|
|
$pay_time = date("Y-m",strtotime('-1 month'));
|
|
|
|
|
$map['pay_time'] = date("Y-m",strtotime('-1 month'));
|
|
|
|
|
$pay_time = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01'));
|
|
|
|
|
$map['pay_time'] = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($pay_time == 'all') {
|
|
|
|
@ -984,7 +984,7 @@ class TimingController extends AdminController {
|
|
|
|
|
$date = date('Y-m', strtotime($start . ' + ' . $i . ' month'));
|
|
|
|
|
$i++;
|
|
|
|
|
$this->insertAllUserBonus($date);
|
|
|
|
|
} while ($date < date('Y-m', strtotime("{$end} -1 month")));
|
|
|
|
|
} while ($date < date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01')));
|
|
|
|
|
|
|
|
|
|
// $map['pay_time'] = [];
|
|
|
|
|
unset($map['pay_time']);
|
|
|
|
@ -1090,7 +1090,7 @@ class TimingController extends AdminController {
|
|
|
|
|
public function sendMarketBonus(){
|
|
|
|
|
echo date("Y-m-d H:i:s")."----------------------月初发放市场专员应发份额----------------------\n";
|
|
|
|
|
|
|
|
|
|
$map['pay_time'] = date("Y-m",strtotime('-1 month'));
|
|
|
|
|
$map['pay_time'] = date('Y-m',strtotime(date('Y',time()).'-'.(date('m',time())-1).'-01'));
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['time']) {
|
|
|
|
|
$map['pay_time'] = $_REQUEST['time'];
|
|
|
|
|