|
@@ -5,6 +5,8 @@ import java.util.*;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
+import com.lc.ibps.base.core.util.*;
|
|
|
|
|
+import com.lc.ibps.bpmn.api.IBpmAgentService;
|
|
|
import com.lc.ibps.bpmn.persistence.entity.BpmAgentPo;
|
|
import com.lc.ibps.bpmn.persistence.entity.BpmAgentPo;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.dom4j.Document;
|
|
import org.dom4j.Document;
|
|
@@ -22,11 +24,6 @@ import com.lc.ibps.api.org.exception.OrgException;
|
|
|
import com.lc.ibps.auth.repository.AuthAppApiRepository;
|
|
import com.lc.ibps.auth.repository.AuthAppApiRepository;
|
|
|
import com.lc.ibps.base.core.constants.StringPool;
|
|
import com.lc.ibps.base.core.constants.StringPool;
|
|
|
import com.lc.ibps.base.core.exception.BaseException;
|
|
import com.lc.ibps.base.core.exception.BaseException;
|
|
|
-import com.lc.ibps.base.core.util.ArrayUtil;
|
|
|
|
|
-import com.lc.ibps.base.core.util.BeanUtils;
|
|
|
|
|
-import com.lc.ibps.base.core.util.Dom4jUtil;
|
|
|
|
|
-import com.lc.ibps.base.core.util.I18nUtil;
|
|
|
|
|
-import com.lc.ibps.base.core.util.JacksonUtil;
|
|
|
|
|
import com.lc.ibps.base.core.util.string.StringUtil;
|
|
import com.lc.ibps.base.core.util.string.StringUtil;
|
|
|
import com.lc.ibps.base.datasource.dynamic.DbContextHolder;
|
|
import com.lc.ibps.base.datasource.dynamic.DbContextHolder;
|
|
|
import com.lc.ibps.base.datasource.util.DbUtil;
|
|
import com.lc.ibps.base.datasource.util.DbUtil;
|
|
@@ -171,17 +168,17 @@ public class ResourcesProvider extends GenericProvider implements IResourcesServ
|
|
|
@Override
|
|
@Override
|
|
|
public APIResult<List<ResourcesPo>> getMenuData(
|
|
public APIResult<List<ResourcesPo>> getMenuData(
|
|
|
@ApiParam(name = "systemId", value = "所属子系统Id", required = true)
|
|
@ApiParam(name = "systemId", value = "所属子系统Id", required = true)
|
|
|
- @RequestParam(name = "systemId", required = true) String systemId,
|
|
|
|
|
- @ApiParam(name = "roles", value = "代理角色", required = false)
|
|
|
|
|
- @RequestParam(name = "roles", required = false) String roles) {
|
|
|
|
|
|
|
+ @RequestParam(name = "systemId", required = true) String systemId) {
|
|
|
APIResult<List<ResourcesPo>> result = new APIResult<>();
|
|
APIResult<List<ResourcesPo>> result = new APIResult<>();
|
|
|
try {
|
|
try {
|
|
|
logger.debug("com.lc.ibps.common.provider.ResourcesProvider.findByParentIdAndSystemId()--->systemId={} ",
|
|
logger.debug("com.lc.ibps.common.provider.ResourcesProvider.findByParentIdAndSystemId()--->systemId={} ",
|
|
|
systemId);
|
|
systemId);
|
|
|
User user = ContextUtil.getCurrentUser();
|
|
User user = ContextUtil.getCurrentUser();
|
|
|
List<String> agentRoles = null;
|
|
List<String> agentRoles = null;
|
|
|
- if(StringUtils.isNotBlank(roles)){
|
|
|
|
|
- agentRoles = Arrays.asList(roles.split(","));
|
|
|
|
|
|
|
+ IBpmAgentService bpmAgentService = AppUtil.getBean(IBpmAgentService.class);
|
|
|
|
|
+ APIResult<List<String>> rolesResult = bpmAgentService.roles();
|
|
|
|
|
+ if(rolesResult.isSuccess()){
|
|
|
|
|
+ agentRoles = rolesResult.getData();
|
|
|
}
|
|
}
|
|
|
List<ResourcesPo> list = resourcesRepository.getByUserIdSystemId(user.getUserId(), user.isSuper(),
|
|
List<ResourcesPo> list = resourcesRepository.getByUserIdSystemId(user.getUserId(), user.isSuper(),
|
|
|
systemId,agentRoles);
|
|
systemId,agentRoles);
|