Merge pull request '特殊公司评级管理权限' (#18) from feature/1211 into release

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/18
master
张谷成 4 years ago
commit 02535c1a4b

@ -4,6 +4,7 @@
namespace Home\Controller;
use Base\Model\PromoteModel;
use Base\Service\PromoteCompanyService;
use Base\Service\PromoteService;
use Base\Service\PromoteGradeService;
@ -14,7 +15,10 @@ class PromoteGradeController extends BaseController
parent::_initialize();
$loginPromote = $this->getLoginPromote();
if(C('APP_ENV') == 'dev' || in_array($loginPromote['company_id'], [334, 370])) {
// 推广公司
$promoteCompanyService = new PromoteCompanyService();
$promoteCompany = $promoteCompanyService->getCompanies([$loginPromote['company_id']]);
if (C('APP_ENV') == 'dev' || $promoteCompany[$loginPromote['company_id']]['type'] == $promoteCompanyService::TYPE_CUSTOM) { // 特殊公司
} else {
return $this->error('您没有权限');

Loading…
Cancel
Save