|
|
@ -735,7 +735,6 @@ class MarketPercentageController extends ThinkController
|
|
|
|
$data[$key]['extend_commission'] +=$wait_amount[$value['admin_id'] . date("Y-m",strtotime("last month",strtotime($value['pay_time'])))];
|
|
|
|
$data[$key]['extend_commission'] +=$wait_amount[$value['admin_id'] . date("Y-m",strtotime("last month",strtotime($value['pay_time'])))];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$insert['pay_time'] = $data[$key]['pay_time'];
|
|
|
|
$insert['pay_time'] = $data[$key]['pay_time'];
|
|
|
|
$insert['admin_id'] = $data[$key]['admin_id'];
|
|
|
|
$insert['admin_id'] = $data[$key]['admin_id'];
|
|
|
|
$insert['real_name'] = $data[$key]['real_name'];
|
|
|
|
$insert['real_name'] = $data[$key]['real_name'];
|
|
|
@ -787,15 +786,14 @@ class MarketPercentageController extends ThinkController
|
|
|
|
->join("left join sys_member member on access.uid=member.uid")
|
|
|
|
->join("left join sys_member member on access.uid=member.uid")
|
|
|
|
->where(['pay_time'=>$_REQUEST['pay_time'],'admin_id'=>$_REQUEST['admin_id']])
|
|
|
|
->where(['pay_time'=>$_REQUEST['pay_time'],'admin_id'=>$_REQUEST['admin_id']])
|
|
|
|
->select();
|
|
|
|
->select();
|
|
|
|
// dump($map['pay_time']);die();
|
|
|
|
// dump($data);die();
|
|
|
|
|
|
|
|
|
|
|
|
foreach($data as $key => $value) {
|
|
|
|
foreach($data as $key => $value) {
|
|
|
|
$sign = 0;
|
|
|
|
$sign = 0;
|
|
|
|
if (!$data[$key]['extend_commission']) {
|
|
|
|
if ($value['extend_commission']=='0.00') {
|
|
|
|
$sign = 1;
|
|
|
|
$sign = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$market_percentage = json_decode($value['market_percentage'],true);
|
|
|
|
$market_percentage = json_decode($value['market_percentage'],true);
|
|
|
|
|
|
|
|
// $month = date("m",strtotime($value['pay_time']));
|
|
|
|
if ($market_percentage['time'] == 1) {
|
|
|
|
if ($market_percentage['time'] == 1) {
|
|
|
|
|
|
|
|
|
|
|
|
if ($month == '07') {
|
|
|
|
if ($month == '07') {
|
|
|
@ -829,6 +827,7 @@ class MarketPercentageController extends ThinkController
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$update['extend_commission'] = $data[$key]['extend_commission'];
|
|
|
|
$update['extend_commission'] = $data[$key]['extend_commission'];
|
|
|
|
|
|
|
|
// var_dump($sign);
|
|
|
|
if ($sign) {
|
|
|
|
if ($sign) {
|
|
|
|
M("market_altogether","tab_")
|
|
|
|
M("market_altogether","tab_")
|
|
|
|
->where(['pay_time'=>$data[$key]['pay_time'],'admin_id'=>$data[$key]['admin_id']])
|
|
|
|
->where(['pay_time'=>$data[$key]['pay_time'],'admin_id'=>$data[$key]['admin_id']])
|
|
|
|