ximinghao преди 3 месеца
родител
ревизия
2471fbc36d

+ 2 - 0
src/main/java/com/skyversation/xjcy/bean/User.java

@@ -7,10 +7,12 @@ import lombok.Data;
 public class User implements FromJSON{
     private String cUsercode;
     private String cGlGs;
+    private String cUserStatus;
     public JSONObject toJSON(){
         JSONObject json = new JSONObject();
         json.put("c_usercode", cUsercode);
         json.put("c_gl_gs", cGlGs);
+        json.put("c_user_status", cUserStatus);
         json.put("title", cUsercode);
         json.put("content", cUsercode);
         return json;

+ 3 - 1
src/main/java/com/skyversation/xjcy/controller/OtherController.java

@@ -1,6 +1,7 @@
 package com.skyversation.xjcy.controller;
 
 import com.alibaba.fastjson.JSONObject;
+import com.skyversation.xjcy.bean.User;
 import com.skyversation.xjcy.dms.DMSColumn;
 import com.skyversation.xjcy.dms.DMSService;
 import com.skyversation.xjcy.service.AuthService;
@@ -54,8 +55,9 @@ public class OtherController {
         List<JSONObject> userJsons = dMSService.getUserJSONByCode(usercode, authService.getTokenOfServiceAccount());
         if (!userJsons.isEmpty()) {
             JSONObject userJSON = userJsons.get(0);
+            User user = JSONObject.toJavaObject(userJSON, User.class);
             if (userJSON != null) {
-                userJSON.put("c_gl_gs", enterprise);
+                user.setCGlGs(enterprise);
                 dMSService.updateToDms(Collections.singletonList(userJSON), authService.getTokenOfServiceAccount(), DMSColumn.USER);
             }
         }

+ 1 - 0
src/main/java/com/skyversation/xjcy/service/AuthService.java

@@ -448,6 +448,7 @@ public class AuthService {
         if (getUserDmsData(usercode) == null) {
             User user = new User();
             user.setCUsercode(usercode);
+            user.setCUserStatus("1");
             boolean insertSuccess = dMSService.insertToDms(user.toJSON(), getTokenOfServiceAccount(), DMSColumn.USER);
             if (!insertSuccess) {
                 allSuccess = false;

+ 7 - 7
src/main/resources/application.yml

@@ -49,12 +49,12 @@ spring:
 app:
   dms:
     path: http://127.0.0.1:10081/dms
-#  wechat:
-#    appid: ungiven
-#    secret-key: ungiven
-#    enable: false
-#
   wechat:
-    appid: ${XJCY_WECHAT_APPID:wx125843453562c86c}
-    secret-key: ${XJCY_WECHAT_SECRET:6028cc345cfdbc76224d750a13519762}
+    appid: ungiven
+    secret-key: ungiven
+    enable: false
+
+#  wechat:
+#    appid: ${XJCY_WECHAT_APPID:wx125843453562c86c}
+#    secret-key: ${XJCY_WECHAT_SECRET:6028cc345cfdbc76224d750a13519762}
 #   微信小程序的鉴权要求统一的access token维护服务,所以在测试时不提供鉴权信息避免破坏正式环境的运行