|
|
@@ -7,6 +7,7 @@ import com.usoftchina.saas.account.po.*;
|
|
|
import com.usoftchina.saas.account.service.ResourceService;
|
|
|
import com.usoftchina.saas.account.service.RoleService;
|
|
|
import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
|
|
|
+import com.usoftchina.saas.commons.cache.ConfigsCache;
|
|
|
import com.usoftchina.saas.context.BaseContextHolder;
|
|
|
import com.usoftchina.saas.utils.BeanMapper;
|
|
|
import com.usoftchina.saas.utils.CollectionUtils;
|
|
|
@@ -92,7 +93,12 @@ public class RoleServiceImpl extends CommonBaseServiceImpl<RoleMapper, Role> imp
|
|
|
public List<PowerDTO> getResourcePowerById(Long id) {
|
|
|
List<PowerDTO> powerDTOList = new ArrayList<PowerDTO>();
|
|
|
List<Map<String, Object>> classifyList = roleResourceMapper.selectClassifyByRoleId(id);
|
|
|
- List<PowerInfo> powerInfoList = roleResourceMapper.selectPowerInfo();
|
|
|
+ boolean enableB2B = ConfigsCache.current().enableB2B();
|
|
|
+ String condition = null;
|
|
|
+ if (!enableB2B){
|
|
|
+ condition = "s.is_b2b = 0";
|
|
|
+ }
|
|
|
+ List<PowerInfo> powerInfoList = roleResourceMapper.selectPowerInfo(condition);
|
|
|
List<OtherPower> otherPowerList = roleResourceMapper.selectOthersPower();
|
|
|
List<OtherPower> hasOtherPowerList = roleResourceMapper.selectOthersPowerByRoleId(id);
|
|
|
|