Browse Source

添加获取上周用户最大uu号方法

wangmh 7 years ago
parent
commit
f338c6a628
1 changed files with 24 additions and 0 deletions
  1. 24 0
      sso-common/src/main/java/com/uas/sso/util/AccountUtils.java

+ 24 - 0
sso-common/src/main/java/com/uas/sso/util/AccountUtils.java

@@ -1373,4 +1373,28 @@ public class AccountUtils {
         }
         return null;
     }
+
+    /**
+     * 获取上周注册用户最大uu号
+     * @return 用户uu号
+     * @throws Exception
+     */
+    public static Long getMaxUUInLastWeek() throws Exception {
+        String url = AccountConfig.getUserSaveUrl();
+        if (!StringUtils.isEmpty(url)) {
+            url = url + "/maxuu/lastWeek";
+            HttpUtil.ResponseWrap res = HttpUtil.doGet(url);
+            if (!res.isSuccess()) {
+                throw new Exception(res.getContent());
+            } else {
+                ResultWrap result = JSON.parseObject(res.getContent(), ResultWrap.class);
+                if (!result.isSuccess()) {
+                    throw new Exception(result.getErrMsg());
+                } else if (result.getContent() != null) {
+                    return Long.valueOf(result.getContent().toString());
+                }
+            }
+        }
+        return null;
+    }
 }