超管审批额度不占用额度池
This commit is contained in:
@@ -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