|
@@ -95,11 +95,12 @@ public class ResourceQuotaServiceImpl extends ServiceImpl<ResourceQuotaMapper, R
|
|
|
private ResourceQuota getResourceQuota(String uid) {
|
|
|
ResourceQuota resourceQuota =
|
|
|
this.getOne(new LambdaQueryWrapper<ResourceQuota>().eq(ResourceQuota::getUid, uid));
|
|
|
- if (Objects.isNull(resourceQuota)) {
|
|
|
- log.info("用户 {} 未配置资源额度", uid);
|
|
|
+ if (Objects.nonNull(resourceQuota)) {
|
|
|
+ return resourceQuota;
|
|
|
}
|
|
|
|
|
|
// 1. 初始化DB entity
|
|
|
+ log.info("用户 {} 未配置资源额度", uid);
|
|
|
resourceQuota = new ResourceQuota();
|
|
|
resourceQuota.setUid(uid);
|
|
|
resourceQuota.setWebsiteQuota(defaultWebsiteQuota);
|