|
|
@@ -109,29 +109,25 @@ public class MirrorController {
|
|
|
* GPT车票跳转登录
|
|
|
*
|
|
|
* @param userToken 用户token
|
|
|
- * @param carId 车票id
|
|
|
* @return 登陆结果
|
|
|
*/
|
|
|
@RequestMapping("/gpt/oauth")
|
|
|
- public Result<String> gptOauth(@RequestParam("usertoken") String userToken, @RequestParam("carid") String carId) {
|
|
|
+ public Result<String> gptOauth(@RequestParam("usertoken") String userToken) {
|
|
|
try {
|
|
|
- log.info("用户通过userToken:{}访问镜像车队carId:{}", userToken, carId);
|
|
|
+ log.info("用户通过userToken:{}", userToken);
|
|
|
ChatgptUser user = chatGptAccountService.findByUserTokenAndExpireTimeAfter(userToken, LocalDateTime.now());
|
|
|
if (user == null) {
|
|
|
return GatewayResponse.SUCCESS.newBuilder().setMsg("用户不存在或已过期").setCode(0).toResult();
|
|
|
}
|
|
|
|
|
|
- ChatgptSession session = chatGptAccountService.checkSession(carId);
|
|
|
- if (session.getIsCar()) {
|
|
|
- log.info("用户:{}通过userToken:{}访问镜像车队carId:{}成功", user.getName(), userToken, carId);
|
|
|
-
|
|
|
- return GatewayResponse.SUCCESS.newBuilder().setMsg("登陆成功").setCode(1).toResult(StringUtil.getString(user.getRelationId()));
|
|
|
- }
|
|
|
+ //ChatgptSession session = chatGptAccountService.checkSession(carId);
|
|
|
+ //
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().setMsg("登陆成功").setCode(1).toResult(StringUtil.getString(user.getRelationId()));
|
|
|
+ //}
|
|
|
} catch (Exception e) {
|
|
|
log.error("服务器错误", e);
|
|
|
return GatewayResponse.FAIL.newBuilder().setMsg("服务器错误").setCode(0).toResult();
|
|
|
}
|
|
|
- return GatewayResponse.FAIL.newBuilder().setMsg("服务器错误").setCode(0).toResult();
|
|
|
}
|
|
|
|
|
|
|