|
@@ -1,22 +1,14 @@
|
|
|
package com.persagy.adm.server.auth.controller;
|
|
|
|
|
|
-import cn.hutool.core.io.IoUtil;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
import com.persagy.adm.server.auth.domain.LoginVo;
|
|
|
+import com.persagy.adm.server.auth.service.AdmAuthService;
|
|
|
+import com.persagy.dmp.auth.client.BossAuthFacade;
|
|
|
+import com.persagy.dmp.auth.client.PaasAccountFacade;
|
|
|
+import com.persagy.dmp.auth.domain.BossAuthUser;
|
|
|
import com.persagy.dmp.common.model.response.CommonResult;
|
|
|
import com.persagy.dmp.common.utils.ResultHelper;
|
|
|
-import com.persagy.dmp.file.model.FileInfo;
|
|
|
-import com.persagy.dmp.file.model.FileInfoCreator;
|
|
|
-import com.persagy.dmp.file.utils.FileStorageHelper;
|
|
|
-import lombok.SneakyThrows;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-
|
|
|
-import javax.imageio.ImageIO;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import java.awt.*;
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.InputStream;
|
|
|
|
|
|
/**
|
|
|
* 00-登录及权限控制
|
|
@@ -27,8 +19,11 @@ import java.io.InputStream;
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/auth")
|
|
|
+@RequiredArgsConstructor
|
|
|
public class AdmAuthController {
|
|
|
|
|
|
+ private final AdmAuthService admAuthService;
|
|
|
+
|
|
|
/**
|
|
|
* 000101-登录-登录接口
|
|
|
* @param loginVo : 登录信息
|
|
@@ -36,11 +31,21 @@ public class AdmAuthController {
|
|
|
* @author : lijie
|
|
|
* Update By 2022/1/7 21:57
|
|
|
*/
|
|
|
- @PostMapping("/account/login")
|
|
|
+ @PostMapping(value = "/account/login")
|
|
|
public CommonResult<String> accountLogin(@RequestBody LoginVo loginVo) {
|
|
|
- return ResultHelper.single("eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJ5dXNodS1zYWFzLWNsaWVudCIsInN1YiI6Inl1c2h1LXVzZXIiLCJpc3MiOiJ5dXNodSIsImp0aSI6IjUxNmM2MGFjLWYyNDUtNGFjMC05MjliLTY0MjJkYTk3MjA5ZCJ9.XifozaE83Dktuh9WFCUp10lLt_HP1c5YzFWPBRX53AI");
|
|
|
+ return PaasAccountFacade.accountLogin(loginVo);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 000102-登录-获取当前登录人的信息
|
|
|
+ * @return : com.persagy.dmp.common.model.response.CommonResult<com.persagy.dmp.auth.domain.BossAuthUser>
|
|
|
+ * @author : lijie
|
|
|
+ * Update By 2022/1/11 15:50
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/login/loginInfo")
|
|
|
+ public CommonResult<BossAuthUser> loginInfo() {
|
|
|
+ return ResultHelper.single(admAuthService.loginInfo());
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|