Merge branch 'hotfix/market_percentage' of wmtx/platform into master

市场业绩bug修改,权限添加
master
廖金灵 4 years ago committed by Gogs
commit 0e878884bb

@ -23,7 +23,7 @@ class MarketPercentageController extends ThinkController
$admin_id = $_SESSION['onethink_admin']['user_auth']['uid']; $admin_id = $_SESSION['onethink_admin']['user_auth']['uid'];
$map['admin_id'] = $admin_id; $map['admin_id'] = $admin_id;
if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14) { if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14||session('user_group_id') == 19||session('user_group_id') == 23) {
unset($map['admin_id']); unset($map['admin_id']);
$admin_data = M("member") $admin_data = M("member")
->field("access.uid admin_id") ->field("access.uid admin_id")
@ -199,7 +199,7 @@ class MarketPercentageController extends ThinkController
$admin_id = $_SESSION['onethink_admin']['user_auth']['uid']; $admin_id = $_SESSION['onethink_admin']['user_auth']['uid'];
$map['admin_id'] = $admin_id; $map['admin_id'] = $admin_id;
if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14) { if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14||session('user_group_id') == 19||session('user_group_id') == 23) {
unset($map['admin_id']); unset($map['admin_id']);
$admin_data = M("member") $admin_data = M("member")
@ -561,7 +561,7 @@ class MarketPercentageController extends ThinkController
$admin_id = $_SESSION['onethink_admin']['user_auth']['uid']; $admin_id = $_SESSION['onethink_admin']['user_auth']['uid'];
$map['admin_id'] = $admin_id; $map['admin_id'] = $admin_id;
if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14) { if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14||session('user_group_id') == 19||session('user_group_id') == 23) {
unset($map['admin_id']); unset($map['admin_id']);
$admin_data = M("member") $admin_data = M("member")

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

Loading…
Cancel
Save