"...plugins/animate/git@ustchcs.com:gujinli1118/MCMS.git" did not exist on "d678961a60c7484d52ad08c5b2c53edc08031ec4"
Commit a5230801 authored by 季圣华's avatar 季圣华
Browse files

解决登录时候获取角色的bug

parent afda050e
...@@ -75,6 +75,8 @@ public class TenantConfig { ...@@ -75,6 +75,8 @@ public class TenantConfig {
// 过滤自定义查询此时无租户信息约束出现 // 过滤自定义查询此时无租户信息约束出现
if ("com.jsh.erp.datasource.mappers.UserMapperEx.getUserListByUserNameOrLoginName".equals(ms.getId())) { if ("com.jsh.erp.datasource.mappers.UserMapperEx.getUserListByUserNameOrLoginName".equals(ms.getId())) {
return true; return true;
} else if ("com.jsh.erp.datasource.mappers.RoleMapperEx.getRoleWithoutTenant".equals(ms.getId())) {
return true;
} }
return false; return false;
} }
......
...@@ -18,4 +18,7 @@ public interface RoleMapperEx { ...@@ -18,4 +18,7 @@ public interface RoleMapperEx {
@Param("name") String name); @Param("name") String name);
int batchDeleteRoleByIds(@Param("updateTime") Date updateTime, @Param("updater") Long updater, @Param("ids") String ids[]); int batchDeleteRoleByIds(@Param("updateTime") Date updateTime, @Param("updater") Long updater, @Param("ids") String ids[]);
Role getRoleWithoutTenant(
@Param("roleId") Long roleId);
} }
\ No newline at end of file
...@@ -183,4 +183,8 @@ public class RoleService { ...@@ -183,4 +183,8 @@ public class RoleService {
} }
return result; return result;
} }
public Role getRoleWithoutTenant(Long roleId) {
return roleMapperEx.getRoleWithoutTenant(roleId);
}
} }
...@@ -750,7 +750,7 @@ public class UserService { ...@@ -750,7 +750,7 @@ public class UserService {
if(valueArray.length>0) { if(valueArray.length>0) {
roleId = valueArray[0]; roleId = valueArray[0];
} }
Role role = roleService.getRole(Long.parseLong(roleId)); Role role = roleService.getRoleWithoutTenant(Long.parseLong(roleId));
if(role!=null) { if(role!=null) {
return role.getType(); return role.getType();
} else { } else {
......
...@@ -35,4 +35,10 @@ ...@@ -35,4 +35,10 @@
</foreach> </foreach>
) )
</update> </update>
<select id="getRoleWithoutTenant" resultType="com.jsh.erp.datasource.entities.Role">
select * from jsh_role
where 1=1
and ifnull(delete_flag,'0') !='1'
and id=#{roleId}
</select>
</mapper> </mapper>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment