|
|
@ -24,6 +24,15 @@ class MarketPercentageController extends ThinkController
|
|
|
|
$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) {
|
|
|
|
unset($map['admin_id']);
|
|
|
|
unset($map['admin_id']);
|
|
|
|
|
|
|
|
$admin_data = M("member")
|
|
|
|
|
|
|
|
->field("access.uid admin_id")
|
|
|
|
|
|
|
|
->join("left join sys_auth_group_access access on sys_member.uid = access.uid")
|
|
|
|
|
|
|
|
->join("left join sys_auth_group auth on access.group_id=auth.id")
|
|
|
|
|
|
|
|
->where(['group_id'=>['in','11,12,21']])
|
|
|
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
if ($admin_data) {
|
|
|
|
|
|
|
|
$map['admin_id'] = ['in',array_column($admin_data,'admin_id')];
|
|
|
|
|
|
|
|
}
|
|
|
|
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
|
|
|
|
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -52,7 +61,7 @@ class MarketPercentageController extends ThinkController
|
|
|
|
$date = date('Y-m', strtotime($start . ' + ' . $i . ' month'));
|
|
|
|
$date = date('Y-m', strtotime($start . ' + ' . $i . ' month'));
|
|
|
|
$search_date[] = $date;
|
|
|
|
$search_date[] = $date;
|
|
|
|
$i++;
|
|
|
|
$i++;
|
|
|
|
}while ($date < date('Y-m', strtotime("{$end} -1 month")));
|
|
|
|
}while ($date < date('Y-m', strtotime("{$end}")));
|
|
|
|
|
|
|
|
|
|
|
|
if ($search_date) {
|
|
|
|
if ($search_date) {
|
|
|
|
$map['pay_time'] = ['in', $search_date];
|
|
|
|
$map['pay_time'] = ['in', $search_date];
|
|
|
@ -67,13 +76,13 @@ class MarketPercentageController extends ThinkController
|
|
|
|
$date = date('Y-m', strtotime($start . ' + ' . $i . ' month'));
|
|
|
|
$date = date('Y-m', strtotime($start . ' + ' . $i . ' month'));
|
|
|
|
$search_date[] = $date;
|
|
|
|
$search_date[] = $date;
|
|
|
|
$i++;
|
|
|
|
$i++;
|
|
|
|
}while ($date < date('Y-m', strtotime("{$end} -1 month")));
|
|
|
|
}while ($date < date('Y-m', strtotime("{$end}")));
|
|
|
|
|
|
|
|
|
|
|
|
if ($search_date) {
|
|
|
|
if ($search_date) {
|
|
|
|
$map['pay_time'] = ['in', $search_date];
|
|
|
|
$map['pay_time'] = ['in', $search_date];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// dump($map);die();
|
|
|
|
// var_dump($map);die();
|
|
|
|
// var_dump($map);die();
|
|
|
|
|
|
|
|
|
|
|
|
$data = M("settleup_marketorder","tab_")
|
|
|
|
$data = M("settleup_marketorder","tab_")
|
|
|
@ -186,14 +195,27 @@ class MarketPercentageController extends ThinkController
|
|
|
|
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
|
|
|
|
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
|
|
|
|
$_REQUEST['group_id']?($map['level'] = $_REQUEST['group_id']):'';
|
|
|
|
$_REQUEST['group_id']?($map['level'] = $_REQUEST['group_id']):'';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$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) {
|
|
|
|
unset($map['admin_id']);
|
|
|
|
unset($map['admin_id']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$admin_data = M("member")
|
|
|
|
|
|
|
|
->field("access.uid admin_id")
|
|
|
|
|
|
|
|
->join("left join sys_auth_group_access access on sys_member.uid = access.uid")
|
|
|
|
|
|
|
|
->join("left join sys_auth_group auth on access.group_id=auth.id")
|
|
|
|
|
|
|
|
->where(['group_id'=>['in','11,12,21']])
|
|
|
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
if ($admin_data) {
|
|
|
|
|
|
|
|
$map['admin_id'] = ['in',array_column($admin_data,'admin_id')];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
|
|
|
|
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$search_date = [];
|
|
|
|
$search_date = [];
|
|
|
|
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
|
|
|
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
|
|
|
|
|
|
|
|
|
|
@ -507,6 +529,17 @@ class MarketPercentageController extends ThinkController
|
|
|
|
$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) {
|
|
|
|
unset($map['admin_id']);
|
|
|
|
unset($map['admin_id']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$admin_data = M("member")
|
|
|
|
|
|
|
|
->field("access.uid admin_id")
|
|
|
|
|
|
|
|
->join("left join sys_auth_group_access access on sys_member.uid = access.uid")
|
|
|
|
|
|
|
|
->join("left join sys_auth_group auth on access.group_id=auth.id")
|
|
|
|
|
|
|
|
->where(['group_id'=>['in','11,12,21']])
|
|
|
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
if ($admin_data) {
|
|
|
|
|
|
|
|
$map['admin_id'] = ['in',array_column($admin_data,'admin_id')];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
|
|
|
|
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -675,6 +708,17 @@ class MarketPercentageController extends ThinkController
|
|
|
|
public function sendBonus() {
|
|
|
|
public function sendBonus() {
|
|
|
|
|
|
|
|
|
|
|
|
$map['pay_time'] = $_REQUEST['pay_time'];
|
|
|
|
$map['pay_time'] = $_REQUEST['pay_time'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$admin_data = M("member")
|
|
|
|
|
|
|
|
->field("access.uid admin_id")
|
|
|
|
|
|
|
|
->join("left join sys_auth_group_access access on sys_member.uid = access.uid")
|
|
|
|
|
|
|
|
->join("left join sys_auth_group auth on access.group_id=auth.id")
|
|
|
|
|
|
|
|
->where(['group_id'=>['in','11,12,21']])
|
|
|
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
if ($admin_data) {
|
|
|
|
|
|
|
|
$map['admin_id'] = ['in',array_column($admin_data,'admin_id')];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$map['admin_id'] = $_REQUEST['admin_id'];
|
|
|
|
$map['admin_id'] = $_REQUEST['admin_id'];
|
|
|
|
|
|
|
|
|
|
|
|
if (!$_REQUEST['pay_time']||!$_REQUEST['admin_id']) {
|
|
|
|
if (!$_REQUEST['pay_time']||!$_REQUEST['admin_id']) {
|
|
|
@ -789,6 +833,16 @@ class MarketPercentageController extends ThinkController
|
|
|
|
|
|
|
|
|
|
|
|
$map = [];
|
|
|
|
$map = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$admin_data = M("member")
|
|
|
|
|
|
|
|
->field("access.uid admin_id")
|
|
|
|
|
|
|
|
->join("left join sys_auth_group_access access on sys_member.uid = access.uid")
|
|
|
|
|
|
|
|
->join("left join sys_auth_group auth on access.group_id=auth.id")
|
|
|
|
|
|
|
|
->where(['group_id'=>['in','11,12,21']])
|
|
|
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
if ($admin_data) {
|
|
|
|
|
|
|
|
$map['admin_id'] = ['in',array_column($admin_data,'admin_id')];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$_REQUEST['pay_time']?$map['pay_time'] = $_REQUEST['pay_time']:'';
|
|
|
|
$_REQUEST['pay_time']?$map['pay_time'] = $_REQUEST['pay_time']:'';
|
|
|
|
$_REQUEST['real_name']?$map['real_name'] = $_REQUEST['real_name']:'';
|
|
|
|
$_REQUEST['real_name']?$map['real_name'] = $_REQUEST['real_name']:'';
|
|
|
|
$_REQUEST['nickname']?$map['nickname'] = $_REQUEST['nickname']:'';
|
|
|
|
$_REQUEST['nickname']?$map['nickname'] = $_REQUEST['nickname']:'';
|
|
|
|