|
@@ -4,8 +4,10 @@ import com.sumbytes.common.annotation.Explain;
|
|
|
import com.sumbytes.common.annotation.LoginRequired;
|
|
|
import com.sumbytes.common.base.domain.Result;
|
|
|
import com.sumbytes.common.util.FileUtil;
|
|
|
+import com.sumbytes.helloblog.auth.domain.vo.AuthUserSocialVO;
|
|
|
import com.sumbytes.helloblog.auth.domain.vo.AuthUserVO;
|
|
|
import com.sumbytes.helloblog.auth.service.AuthUserService;
|
|
|
+import com.sumbytes.helloblog.auth.service.AuthUserSocialService;
|
|
|
import com.sumbytes.helloblog.auth.service.OauthService;
|
|
|
import com.sumbytes.system.enums.RoleEnum;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -17,9 +19,14 @@ import org.springframework.web.bind.annotation.*;
|
|
|
public class AuthUserController {
|
|
|
|
|
|
@Autowired
|
|
|
+ private OauthService oauthService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
private AuthUserService authUserService;
|
|
|
+
|
|
|
@Autowired
|
|
|
- private OauthService oauthService;
|
|
|
+ private AuthUserSocialService authUserSocialService;
|
|
|
+
|
|
|
|
|
|
@Explain("获取用户信息")
|
|
|
@LoginRequired(role = RoleEnum.USER)
|
|
@@ -121,4 +128,21 @@ public class AuthUserController {
|
|
|
return oauthService.registerAdmin(authUserVO);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ @GetMapping("/social/v1/{id}")
|
|
|
+ public Result getSocial(@PathVariable("id") Long id) {
|
|
|
+ return authUserSocialService.getSocial(id);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/social/v1/socials")
|
|
|
+ public Result getSocialEnableList(AuthUserSocialVO authUserSocialVO) {
|
|
|
+ authUserSocialVO.setIsEnabled(1);
|
|
|
+ return authUserSocialService.getSocialList(authUserSocialVO);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/social/v1/info")
|
|
|
+ public Result getSocialInfo() {
|
|
|
+ return authUserSocialService.getSocialInfo();
|
|
|
+ }
|
|
|
}
|