فهرست منبع

登录增加认证

Memory_LG 1 ماه پیش
والد
کامیت
696772d311

+ 12 - 3
src/main/java/com/sooka/sponest/mobile/message/controller/AppMessageController.java

@@ -4,9 +4,7 @@ import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.sooka.sponest.mobile.message.domain.AppMessageVO;
 import com.sooka.sponest.mobile.message.service.AppMessageService;
 import io.swagger.annotations.ApiOperation;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 
@@ -60,4 +58,15 @@ public class AppMessageController {
     }
 
 
+    @PostMapping("/sendMessageTencentVerifyCode")
+    public AjaxResult sendMessageTencentVerifyCode(@RequestBody AppMessageVO messageVO) {
+        return appMessageService.sendMessageTencentVerifyCode(messageVO);
+    }
+
+    @PostMapping("/verifyVerifyCode")
+    public AjaxResult verifyVerifyCode(@RequestBody AppMessageVO messageVO) {
+        return appMessageService.verifyVerifyCode(messageVO);
+    }
+
+
 }

+ 2 - 0
src/main/java/com/sooka/sponest/mobile/message/domain/AppMessageVO.java

@@ -11,4 +11,6 @@ public class AppMessageVO extends AppBaseBO {
     String userId;
     String messageId;
     String messageType;
+    String phone;
+    String verifyCode;
 }

+ 3 - 0
src/main/java/com/sooka/sponest/mobile/message/service/AppMessageService.java

@@ -27,4 +27,7 @@ public interface AppMessageService {
      **/
     public AjaxResult detail(AppMessageVO vo);
 
+    AjaxResult sendMessageTencentVerifyCode(AppMessageVO messageVO);
+
+    AjaxResult verifyVerifyCode(AppMessageVO messageVO);
 }

+ 12 - 0
src/main/java/com/sooka/sponest/mobile/message/service/impl/AppMessageServiceImpl.java

@@ -8,6 +8,8 @@ import com.sooka.sponest.mobile.message.service.AppMessageService;
 import com.sooka.sponest.mobile.remoteapi.RemoteMessageBaseService;
 import com.sooka.sponest.mobile.remoteapi.RemoteSystemBaseService;
 import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 
 import javax.annotation.Resource;
 import java.util.HashMap;
@@ -67,4 +69,14 @@ public class AppMessageServiceImpl implements AppMessageService {
         }
     }
 
+
+    @Override
+    public AjaxResult sendMessageTencentVerifyCode(AppMessageVO messageVO) {
+        return remoteMessageBaseService.sendMessageTencentVerifyCode(messageVO);
+    }
+
+    @Override
+    public AjaxResult verifyVerifyCode(AppMessageVO messageVO) {
+        return remoteMessageBaseService.verifyVerifyCode(messageVO);
+    }
 }

+ 5 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteAuthService.java

@@ -38,4 +38,9 @@ public interface RemoteAuthService {
     @PostMapping("loginApp")
     @LogFeignCall
     R<?> loginApp(@RequestBody LoginBody form);
+
+
+    @PostMapping("/verifyApp")
+    @LogFeignCall
+    AjaxResult verifyApp(LoginBody loginBody);
 }

+ 7 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteMessageBaseService.java

@@ -5,6 +5,7 @@ import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.sooka.sponest.mobile.log.LogFeignCall;
 import com.sooka.sponest.mobile.base.domain.ModulesServiceNameContants;
 import com.sooka.sponest.mobile.event.domain.CentereventMeetingSystemBO;
+import com.sooka.sponest.mobile.message.domain.AppMessageVO;
 import com.sooka.sponest.mobile.remoteapi.factory.RemoteBaseServiceMessageFactory;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -37,4 +38,10 @@ public interface RemoteMessageBaseService {
     @PostMapping("/centerMessageFeign/sendMeetingMsg")
     @LogFeignCall
     public R remoteSendMeetingMsg(@RequestBody CentereventMeetingSystemBO centereventMeetingSystemBO);
+
+    @PostMapping("/centerMessageFeign/sendMessageTencentVerifyCode")
+    AjaxResult sendMessageTencentVerifyCode(@RequestBody AppMessageVO messageVO);
+
+    @PostMapping("/centerMessageFeign/verifyVerifyCode")
+    AjaxResult verifyVerifyCode(@RequestBody AppMessageVO messageVO);
 }

+ 9 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/domain/LoginBody.java

@@ -46,4 +46,13 @@ public class LoginBody
     {
         this.password = password;
     }
+
+    @Override
+    public String toString() {
+        return "LoginBody{" +
+                "username='" + username + '\'' +
+                ", password='" + password + '\'' +
+                ", sessionId='" + sessionId + '\'' +
+                '}';
+    }
 }

+ 5 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/factory/RemoteAuthServiceFallbackFactory.java

@@ -29,6 +29,11 @@ public class RemoteAuthServiceFallbackFactory implements FallbackFactory<RemoteA
             public R<?> loginApp(LoginBody form) {
                 return null;
             }
+
+            @Override
+            public AjaxResult verifyApp(LoginBody loginBody) {
+                return null;
+            }
         };
 
     }

+ 11 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/factory/RemoteBaseServiceMessageFactory.java

@@ -4,6 +4,7 @@ import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
 import com.sooka.sponest.mobile.event.domain.CentereventMeetingSystemBO;
+import com.sooka.sponest.mobile.message.domain.AppMessageVO;
 import com.sooka.sponest.mobile.remoteapi.RemoteMessageBaseService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -39,6 +40,16 @@ public class RemoteBaseServiceMessageFactory implements FallbackFactory<RemoteMe
             public R remoteSendMeetingMsg(CentereventMeetingSystemBO centereventMeetingSystemBO) {
                 return null;
             }
+
+            @Override
+            public AjaxResult sendMessageTencentVerifyCode(AppMessageVO messageVO) {
+                return null;
+            }
+
+            @Override
+            public AjaxResult verifyVerifyCode(AppMessageVO messageVO) {
+                return null;
+            }
         };
     }
 }

+ 8 - 0
src/main/java/com/sooka/sponest/mobile/system/login/controller/AppLoginController.java

@@ -3,6 +3,7 @@ package com.sooka.sponest.mobile.system.login.controller;
 import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.redis.service.RedisService;
+import com.sooka.sponest.mobile.remoteapi.domain.LoginBody;
 import com.sooka.sponest.mobile.system.login.domain.AppLoginVO;
 import com.sooka.sponest.mobile.system.login.domain.AppUpPwd;
 import com.sooka.sponest.mobile.system.login.domain.SysMenuApp;
@@ -97,4 +98,11 @@ public class AppLoginController {
         return appLoginService.updatePwd(appUpPwd);
     }
 
+
+    @PostMapping("/verifyApp")
+    public AjaxResult verifyApp(@RequestBody LoginBody loginBody){
+        System.out.println("loginBody = " + loginBody);
+        return appLoginService.verifyApp(loginBody);
+    }
+
 }

+ 3 - 0
src/main/java/com/sooka/sponest/mobile/system/login/service/AppLoginService.java

@@ -2,6 +2,7 @@ package com.sooka.sponest.mobile.system.login.service;
 
 import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.sooka.sponest.mobile.remoteapi.domain.LoginBody;
 import com.sooka.sponest.mobile.system.login.domain.AppLoginVO;
 import com.sooka.sponest.mobile.system.login.domain.AppUpPwd;
 import com.sooka.sponest.mobile.system.login.domain.SysMenuApp;
@@ -25,4 +26,6 @@ public interface AppLoginService {
     AjaxResult getAppChildrenMenuOrButtonByParentId(SysMenuApp sysMenuApp);
 
     AjaxResult updatePwd(AppUpPwd appUpPwd);
+
+    AjaxResult verifyApp(LoginBody loginBody);
 }

+ 8 - 0
src/main/java/com/sooka/sponest/mobile/system/login/service/impl/AppLoginServiceImpl.java

@@ -19,6 +19,8 @@ import com.sooka.sponest.mobile.system.login.service.AppLoginService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -121,4 +123,10 @@ public class AppLoginServiceImpl implements AppLoginService {
     public AjaxResult updatePwd(AppUpPwd appUpPwd){
         return remoteSystemBaseService.updatPwd(appUpPwd);
     }
+
+
+    @Override
+    public AjaxResult verifyApp(LoginBody loginBody){
+        return remoteAuthService.verifyApp(loginBody);
+    }
 }