超管审批额度不占用额度池

This commit is contained in:
luojiaquan
2026-09-23 14:44:52 +08:00
parent b02af14179
commit 6da1e10197
3 changed files with 15 additions and 4 deletions
@@ -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>