package com.ruoyi.api.controller.user;

import com.ruoyi.api.controller.common.AbstractApiController;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.user.service.IUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * 小程序用户管理Controller
 *
 * @author wuchao
 * @date 2022-03-03
 */
@Validated
@Api(value = "小程序用户管理控制器", tags = {"小程序用户管理管理"})
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/miniapp/user")
public class ApiUserController extends AbstractApiController {

    private final IUserService iUserService;

    /**
     * 获取用户管理详细信息
     */
    @ApiOperation("获取用户管理详细信息")
    @GetMapping("/info")
    public R getInfo() {
        return R.ok(iUserService.getById(getUserId(), true));
    }

}
