|
@@ -0,0 +1,27 @@
|
|
|
|
|
+package com.zsElectric.boot.business.controller.applet;
|
|
|
|
|
+
|
|
|
|
|
+import com.zsElectric.boot.business.model.vo.UserInfoVO;
|
|
|
|
|
+import com.zsElectric.boot.business.service.UserInfoService;
|
|
|
|
|
+import com.zsElectric.boot.core.web.Result;
|
|
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
+
|
|
|
|
|
+@Tag(name = "用户相关接口")
|
|
|
|
|
+@RestController
|
|
|
|
|
+@RequestMapping("/applet/v1/user")
|
|
|
|
|
+@RequiredArgsConstructor
|
|
|
|
|
+public class AppletUserController {
|
|
|
|
|
+
|
|
|
|
|
+ private final UserInfoService userInfoService;
|
|
|
|
|
+
|
|
|
|
|
+ @Operation(summary = "微信小程序获取当前登录信息")
|
|
|
|
|
+ @GetMapping("/getUserInfo")
|
|
|
|
|
+ public Result<UserInfoVO> getUserInfo() {
|
|
|
|
|
+ UserInfoVO currentUserInfo = userInfoService.getCurrentUserInfo();
|
|
|
|
|
+ return Result.success(currentUserInfo);
|
|
|
|
|
+ }
|
|
|
|
|
+}
|