Kaynağa Gözat

fix:修改eai token为门户

lalala 1 yıl önce
ebeveyn
işleme
590e088dd7

+ 6 - 1
seecoder-portal-common/src/main/java/cn/seecoder/seecoderportalcommon/vo/UserVO.java

@@ -16,10 +16,15 @@ public class UserVO {
     @NotBlank
     private String phone;
 
+    /**
+     * 用户学号
+     */
     @Size(max = 64)
-    @Pattern(regexp = "[\\w\\d]*", message = "用户名只包含英文或数字")
     private String username;
 
+    /**
+     * 用户姓名
+     */
     @Size(max = 64)
     private String name;
 

+ 1 - 1
seecoder-portal-server/src/main/java/cn/seecoder/seecoderportalserver/service/AliService.java

@@ -61,8 +61,8 @@ public class AliService {
                     nextPhoneVerification.setPhone(phone);
                     return nextPhoneVerification;
                 });
+        log.info("获取验证码为:"+code);
         phoneVerification.setCode(code);
-//        phoneVerification.setCode("123456");
         phoneVerificationRepository.save(phoneVerification);
         sendSms(phone, code);
     }

+ 0 - 21
seecoder-portal-server/src/main/java/cn/seecoder/seecoderportalserver/web/rest/UserJWTController.java

@@ -101,27 +101,6 @@ public class UserJWTController {
     }
 
 
-    @PostMapping("/user/eai/token")
-    public OkResponse<String> toEai(@RequestBody String token) {
-        return OkResponse.of(getEaiToken(token));
-    }
-
-
-    public String getEaiToken(String token){
-        String uri = eaiHost +"/api/auth/loginByPortal";
-        System.out.println("开始获取eai token");
-        List<NameValuePair> params = new ArrayList<>();
-        params.add(new BasicNameValuePair("id_token",token));
-        try {
-            String response = httpService.sendGet(uri, params, token);
-            System.out.println("response" +response);
-            return JSONObject.parseObject(response).getJSONObject("data").getString("token");
-        } catch (Exception e) {
-            throw new CustomErrorException("获取eai token失败");
-        }
-
-    }
-
 
     @PostMapping("/user/login/yuantu")
     public OkResponse<TokenVO> authorizeYuantuUser(@RequestBody LoginVO loginVO) throws CustomErrorException{