|
|
@@ -31,8 +31,10 @@ import javax.annotation.Resource;
|
|
|
import javax.annotation.security.PermitAll;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.validation.Valid;
|
|
|
+import java.time.LocalDateTime;
|
|
|
import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
+import java.util.Objects;
|
|
|
import java.util.Set;
|
|
|
|
|
|
import static com.poteviohealth.cgp.sso.framework.common.pojo.CommonResult.success;
|
|
|
@@ -69,6 +71,24 @@ public class AuthController {
|
|
|
return success(authService.login(reqVO));
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/loginData")
|
|
|
+ @PermitAll
|
|
|
+ @Operation(summary = "获取loginData")
|
|
|
+ public CommonResult<AuthLoginRespVO> loginData(HttpServletRequest request) {
|
|
|
+ Long loginUserId = getLoginUserId();
|
|
|
+ AuthLoginRespVO respVO = new AuthLoginRespVO();
|
|
|
+ if(Objects.nonNull(loginUserId)){
|
|
|
+ AdminUserDO user = userService.getUser(loginUserId);
|
|
|
+ if(user.getIsChangedPassword()==0){
|
|
|
+ respVO.setLoginDate(null);
|
|
|
+ }else{
|
|
|
+ respVO.setLoginDate(user.getLoginDate());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ return success(respVO);
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping("/logout")
|
|
|
@PermitAll
|
|
|
@Operation(summary = "登出系统")
|