数据权限bug修正

master
zhengyongxing 5 years ago
parent 3151e8b456
commit ce0e9f943d

@ -1625,10 +1625,12 @@ function setPowerPromoteIds(&$map, $column = 'promote_id') {
function get_promote_listOther($select='') {
$promoteRoot = getPowerPromoteIds();
if ($promoteRoot) {
$map['id'] =array('in',$promoteRoot);
}
// $promoteRoot = getPowerPromoteIds();
// if ($promoteRoot) {
// $map['id'] =array('in',$promoteRoot);
// }
setPowerPromoteIds($map,'id');
$list = M("Promote","tab_")->field('id,account,balance_coin')->where($map)->select();//where("status=1")->
if (empty($list)){return '';}
@ -1652,10 +1654,12 @@ function promote_listsOther($type){
$map = '';
}
$promoteRoot = getPowerPromoteIds();
if ($promoteRoot) {
$map['id'] =array('in',$promoteRoot);
}
// $promoteRoot = getPowerPromoteIds();
// if ($promoteRoot) {
// $map['id'] =array('in',$promoteRoot);
// }
setPowerPromoteIds($map,'id');
$data = M('promote','tab_')->where($map)->select();

@ -388,9 +388,11 @@ class PromoteModel extends Model{
public function getPromotersByLevelOther($level=1)
{
$result = [];
$promoteRoot = getPowerPromoteIds();
$result = $this->field("*")->where("level={$level} and id IN({$promoteRoot})")->select();
$where['level'] = $level;
setPowerPromoteIds($where,'id');
$result = $this->field("*")->where($where)->select();
foreach ($result as &$item) {
$item['nickname'] = $item['account'] . ($item['nickname'] ? "({$item['nickname']})" : "");
}

Loading…
Cancel
Save