Эх сурвалжийг харах

Merge branch 'master' into prod

lijin 1 жил өмнө
parent
commit
92a6014dd3

+ 4 - 7
sys-sdk/src/main/java/com/xy/utils/LogUtils.java

@@ -40,15 +40,12 @@ public class LogUtils {
      * @param optTime    操作耗时
      */
     public static void operate(LogEnum.LogType logType, LogEnum.OptType optType, String logContent, int optTime) {
-        Long loginId = null;
+        Long loginId = null, sysId = null;
+        String clientType = null;
         try {
             loginId = AuthorizeUtils.getLoginId(Long.class);
-        } catch (Exception e) {
-
-        }
-        Long sysId = null;
-        try {
             sysId = AuthorizeUtils.getSysId();
+            clientType = AuthorizeUtils.getClientType();
         } catch (Exception e) {
 
         }
@@ -58,7 +55,7 @@ public class LogUtils {
                 .set("optType", optType.getValue())
                 .set("createTime", DataTime.getSring())
                 .set("optTime", optTime)
-                .set("clientType", AuthorizeUtils.getClientType())
+                .set("clientType", clientType)
                 .set("sysId", sysId)
                 .set("optUserId", loginId)
                 .set("clientIp", getIp())

+ 16 - 0
sys-sdk/src/main/java/com/xy/utils/SysCodeConfigureUtils.java

@@ -128,6 +128,22 @@ public class SysCodeConfigureUtils {
         return exp.getBool("show2merc");
     }
 
+    /**
+     * 指定微信openId推送  公众号
+     *
+     * @param expand
+     * @return {@link Boolean}
+     */
+    public static List<String> getWxOpenIds(String expand) {
+        JSONObject exp = getExpandNoticeSet(expand);
+        String wxOpenIds = exp.getStr("wxOpenIds");
+        if (StrUtil.isEmpty(wxOpenIds)) {
+            return new ArrayList<>();
+        }
+        List<String> stringList = StrUtil.split(wxOpenIds, StrUtil.COMMA);
+        return stringList;
+    }
+
     /**
      * 是否推送给商户
      *