Sfoglia il codice sorgente

nlp登录超时,设置是否登录nlp

zhangshuling 1 anno fa
parent
commit
f57126b6fa

+ 6 - 0
xzl-admin/src/main/java/com/xzl/web/service/impl/UserPortraitServiceImpl.java

@@ -22,6 +22,7 @@ import com.xzl.web.utils.ali.DingTalkUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.MapUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import java.sql.Timestamp;
@@ -54,8 +55,13 @@ public class UserPortraitServiceImpl implements UserPortraitService {
     return userPortraitMapper.getWordCloudInfo();
   }
 
+  @Value("${login.nlp}")
+  private boolean loginNlp;
 
   public String loginNLP(String username) {
+    if (!loginNlp) {
+      return null;
+    }
     SysUser sysUser = userService.selectUserByUserName(username);
     String nlpName = sysUser.getNlpName();
     String nlpPwd = sysUser.getNlpPwd();

+ 4 - 1
xzl-admin/src/main/resources/application-prod.yml

@@ -65,4 +65,7 @@ spring:
 pythonFilePath: /usr/local/python/
 pythonPath: /usr/bin/python3
 sqlFilePath: /usr/local/sql
-ERImagePath: /usr/local/ERImage
+ERImagePath: /usr/local/ERImage
+
+login:
+    nlp: true

+ 3 - 0
xzl-admin/src/main/resources/application.yml

@@ -134,3 +134,6 @@ xss:
 mysql:
   binlog:
     tables: xtdb.interface_cm_customer_extend_info, xtdb.interface_md_customer_delivery ,xtdb.interface_md_customer_info,xtdb.interface_md_customer_marketing,xtdb.interface_md_employee,xtdb.interface_md_org_unit
+
+login:
+  nlp: false