修改bug

master
ELF 5 years ago
parent cd90807d58
commit 4d0359aaba

@ -53,6 +53,10 @@ class PromoteRepository {
} else {
$map['user_id'] = ['in', $lockUserIds];
}
} else {
if ($params['lock_status'] == 2) {
$map['_string'] = ' 1<>1';
}
}
}
return $map;
@ -218,7 +222,11 @@ class PromoteRepository {
}
$subQuery = M('user_play_info', 'tab_')->field('user_id')->group('user_id')->where($subMap)->buildSql();
$map['_string'] = ' user_id not in (' . $subQuery . ')';
if (isset($map['_string'])) {
$map['_string'] .= ' and user_id not in (' . $subQuery . ')';
} else {
$map['_string'] = ' user_id not in (' . $subQuery . ')';
}
$inQuery = M('user_play_info', 'tab_')->field('user_id')->group('user_id')->where($map)->buildSql();
$resultMap = ['_string' => 'user_id in (' . $inQuery . ')'];

@ -37,7 +37,11 @@ class PromoteController extends BaseController
{
$this->meta_title = "首页";
$loginPromote = $this->getLoginPromote();
if ($loginPromote['id'] != 1 && $loginPromote['parent_id'] != 1 && $loginPromote['grand_id'] != 1) {
$whiteList = [1, 8];
$isOpenQuery = in_array($loginer['id'], $whiteList) || in_array($loginer['parent_id'], $whiteList) || in_array($loginer['grand_id'], $whiteList) ? true : false;
if (!$isOpenQuery) {
$this->display('prepare');
exit(0);
}

@ -47,7 +47,10 @@
<a href="{:U('Promote/mygrand')}" class="<if condition='CONTROLLER_NAME eq Promote and (ACTION_NAME eq mygrand or ACTION_NAME eq add_chlid or ACTION_NAME eq edit_chlid) '>active</if> ">推广员管理</a>
</if>
</div>
<?php $isOpenQuery = in_array($loginer['id'], [1]) || in_array($loginer['parent_id'], [1]) || in_array($loginer['grand_id'], [1]) ? true : false; ?>
<?php
$whiteList = [1, 8];
$isOpenQuery = in_array($loginer['id'], $whiteList) || in_array($loginer['parent_id'], $whiteList) || in_array($loginer['grand_id'], $whiteList) ? true : false;
?>
<?php if($isOpenQuery):?>
<div class="subNav jssubNav"><i class="prev_icon icon_shujvi"></i><span>数据管理</span><i class="arrow_icon"></i></div>

@ -81,7 +81,7 @@
</div>
<?php if (I('parent_id', 0) > 0):?>
<div class="form-group">
<input type="buttom" class="submit normal_space" onclick="window.history.back();" value="返回上级" style="text-align: center; background: #E5E5E5; color: #2bd8ed; cursor: pointer;">
<a class="submit normal_space" href="{:U('Query/achievement', ['row'=>I('get.row')])}" style="line-height: 36px; display: inline-block; text-align: center; background: #E5E5E5; color: #2bd8ed; cursor: pointer;">返回上级</a>
</div>
<?php endif;?>
</form>

Loading…
Cancel
Save