Răsfoiți Sursa

Merge branch 'website-quota' of wangfan/adweb3-server into master

wangfan 2 luni în urmă
părinte
comite
67d5a6e3fd

+ 3 - 2
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/adweb/quota/service/impl/ResourceQuotaServiceImpl.java

@@ -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);