Merge branch 'master' of http://git.lionquexpress.com/wuweihua/BMS
This commit is contained in:
+6
@@ -53,6 +53,12 @@ public class CreditQuotaServiceImpl implements ICreditQuotaService
|
||||
{
|
||||
throw new ServiceException("无法获取当前登录用户");
|
||||
}
|
||||
// 超管审批不占用任何角色额度池:直接返回空列表,前端不弹选池框(否则 LEFT JOIN 会带出
|
||||
// 超管角色未配置的 0 额度池,导致前端强制选池并被"额度池剩余不足"拦截)
|
||||
if (SecurityUtils.isAdmin(userId))
|
||||
{
|
||||
return java.util.Collections.emptyList();
|
||||
}
|
||||
List<RoleCreditQuotaVo> list = creditQuotaMapper.selectRoleQuotaListByUserId(userId);
|
||||
list.forEach(this::fillAvailable);
|
||||
return list;
|
||||
|
||||
@@ -28,14 +28,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
r.role_name as roleName,
|
||||
r.role_key as roleKey,
|
||||
r.status as status,
|
||||
coalesce(q.total_quota, 0) as totalQuota,
|
||||
q.total_quota as totalQuota,
|
||||
(select coalesce(sum(g.remaining), 0)
|
||||
from customer_credit_grant g
|
||||
where g.role_id = r.role_id and g.status = '0' and g.del_flag = '0') as usedQuota,
|
||||
q.remark as remark
|
||||
from sys_user_role ur
|
||||
inner join sys_role r on r.role_id = ur.role_id and r.del_flag = '0' and r.status = '0'
|
||||
left join sys_role_credit_quota q on q.role_id = r.role_id
|
||||
inner join sys_role_credit_quota q on q.role_id = r.role_id
|
||||
where ur.user_id = #{userId}
|
||||
order by r.role_sort, r.role_id
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user