bug修复
This commit is contained in:
parent
1511ea5870
commit
57a649e67e
@ -5,10 +5,13 @@
|
||||
<select id="getProjectBaseActionList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT t.*,c.authority_id,t.action_name name
|
||||
from base_action t INNER JOIN base_menu a ON t.menu_id=a.menu_id
|
||||
INNER JOIN base_module m ON a.module_id=m.module_id
|
||||
LEFT JOIN base_module_project b ON a.module_id=b.module_id
|
||||
LEFT JOIN base_authority c ON t.action_id=c.action_id
|
||||
INNER JOIN base_module m ON a.module_id=m.module_id
|
||||
LEFT JOIN base_module_project b ON a.module_id=b.module_id
|
||||
LEFT JOIN base_authority c ON t.action_id=c.action_id
|
||||
WHERE b.sn=#{projectSn} and b.type=2 and t.status=1 and a.status=1 and m.style_type=#{styleType}
|
||||
<if test="moduleType != null and moduleType != ''">
|
||||
and m.module_type = #{moduleType}
|
||||
</if>
|
||||
order by a.parent_id,a.priority
|
||||
</select>
|
||||
<select id="getProjectUserActionList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
|
||||
@ -22,9 +22,12 @@
|
||||
<select id="getProjectBaseMenuList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
SELECT a.*,c.authority_id,a.menu_name name
|
||||
from base_menu a INNER JOIN base_module m ON a.module_id=m.module_id
|
||||
LEFT JOIN base_module_project b ON a.module_id=b.module_id
|
||||
LEFT JOIN base_authority c ON a.menu_id=c.menu_id
|
||||
LEFT JOIN base_module_project b ON a.module_id=b.module_id
|
||||
LEFT JOIN base_authority c ON a.menu_id=c.menu_id
|
||||
WHERE b.sn=#{projectSn} and b.type=2 and a.status=1 and m.style_type=#{styleType}
|
||||
<if test="moduleType != null and moduleType != ''">
|
||||
and m.module_type = #{moduleType}
|
||||
</if>
|
||||
order by a.parent_id,a.priority
|
||||
</select>
|
||||
<select id="getProjectUserMenuList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
|
||||
|
||||
@ -21,6 +21,9 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="moduleType != null and moduleType != ''">
|
||||
and a.module_type = #{moduleType}
|
||||
</if>
|
||||
ORDER BY a.module_type,a.label_sort_num,a.label_name,a.module_id
|
||||
</select>
|
||||
<select id="getUserModuleList" resultType="com.zhgd.xmgl.modules.basicdata.entity.BaseModule">
|
||||
|
||||
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.zhgd.jeecg.common.execption.OpenAlertException;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.BaseMenu;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.BaseModule;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.CompanyConfig;
|
||||
@ -21,7 +22,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -114,8 +114,12 @@ public class BaseModuleServiceImpl extends ServiceImpl<BaseModuleMapper, BaseMod
|
||||
@Override
|
||||
public Map<String, Object> getModuleAndMenuList(HashMap<String, Object> paramMap) {
|
||||
String projectSn = MapUtils.getString(paramMap, "projectSn");
|
||||
Integer moduleType = MapUtils.getInteger(paramMap, "moduleType");
|
||||
CompanyConfig companyConfig = companyConfigMapper.getCompanyConfigByProject(projectSn);
|
||||
Map<String, Object> menuAuthority = systemUserService.getUserAuthority(null, 5, projectSn, companyConfig.getHeadquartersSn(), companyConfig.getStyleType());
|
||||
if (companyConfig == null) {
|
||||
throw new OpenAlertException("企业配置不存在");
|
||||
}
|
||||
Map<String, Object> menuAuthority = systemUserService.getUserAuthority(null, 5, projectSn, companyConfig.getHeadquartersSn(), companyConfig.getStyleType(), moduleType);
|
||||
return menuAuthority;
|
||||
}
|
||||
}
|
||||
|
||||
@ -786,6 +786,10 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
||||
}
|
||||
|
||||
public Map<String, Object> getUserAuthority(Long userId, Integer accountType, String sn, String headquartersSn, Integer styleType) {
|
||||
return getUserAuthority(userId, accountType, sn, headquartersSn, styleType, null);
|
||||
}
|
||||
|
||||
public Map<String, Object> getUserAuthority(Long userId, Integer accountType, String sn, String headquartersSn, Integer styleType, Integer moduleType) {
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
List<BaseModule> moduleList = null;
|
||||
@ -807,6 +811,7 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
||||
data.put("roleName", "公司管理员");
|
||||
} else if (accountType == 5) {
|
||||
param.put("projectSn", sn);
|
||||
param.put("moduleType", moduleType);
|
||||
moduleList = baseModuleMapper.getProjectModuleList(param);
|
||||
menuList = baseMenuService.getProjectBaseMenuList(param);
|
||||
actionList = baseActionMapper.getProjectBaseActionList(param);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user