Browse Source

默认登录url

guoshuai 2 weeks ago
parent
commit
e2e44f73c6

+ 6 - 0
src/main/java/com/qmrb/system/service/impl/ContractServiceImpl.java

@@ -25,6 +25,7 @@ import com.qmrb.system.service.SysUserService;
 import com.qmrb.system.service.UserService;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.stereotype.Service;
 
@@ -62,6 +63,8 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
     @Autowired
     private PasswordEncoder passwordEncoder;
 
+    @Value("${default_qrcode_login_url}")
+    private String defaultQrcodeLoginUrl;
     /**
      * 分页查询
      */
@@ -91,6 +94,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
     public ContractForm saveForm(@Valid ContractForm form) {
         // 实体对象转换 form->entity
         Contract entity = converter.form2Entity(form);
+        if(StringUtils.isBlank(form.getQrcodeLoginUrl())){
+            form.setQrcodeLoginUrl(defaultQrcodeLoginUrl);
+        }
         // 持久化
         this.save(entity);
         // 创建协议时,创建客商用户

+ 4 - 1
src/main/resources/application-dev.yml

@@ -173,4 +173,7 @@ apache:
 
 pickCarProducer:
   topic: PushTopic8089
-  tags: push
+  tags: push
+  
+  
+default_qrcode_login_url: http://mini.qmrb.net:9990/#/receive-coupon

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

@@ -171,4 +171,7 @@ apache:
 
 pickCarProducer:
   topic: PushTopic8089
-  tags: push
+  tags: push
+  
+  
+default_qrcode_login_url: http://mini.qmrb.net:9990/#/receive-coupon