Merge pull request '有害' (#455) from feature/market_department_search into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/455
master
廖金灵 3 years ago
commit ce6134db6d

@ -2932,8 +2932,8 @@ function getSearchAdminIds($searchAdminParam = 'admin_id', $searchDepartmentPara
}
if (is_null($adminIds) && isset($_REQUEST[$searchDepartmentParam])) {
$admins = getMarketAdmin($_REQUEST[$searchDepartmentParam]);
$adminIds = count($admins) ? array_column($admins, 'uid') : [-1];
$adminIds = explode(',', A("Market","Event")->getMarketGroupId($_REQUEST[$searchDepartmentParam]));
$adminIds = count($adminIds) ? $adminIds : [-1];
}
return $adminIds;

@ -18,9 +18,10 @@ class MarketEvent extends Controller
/**
* 获取所有市场部组id
*/
public function getMarketGroupId()
public function getMarketGroupId($departmentId = null)
{
$res = M('department','sys_')->where("id in ({$this->MarketDepartmentId})")->getField("group_ids",true);
$departmentIds = $departmentId ? $departmentId : $this->MarketDepartmentId;
$res = M('department','sys_')->where("id in ({$departmentIds})")->getField("group_ids",true);
$sendData = '';
foreach ($res as $value) {
$sendData .= $value.",";

Loading…
Cancel
Save