package com.ningdatech.pmapi.sys.controller;

import com.ningdatech.pmapi.sys.manage.UserGuidanceManage;
import com.ningdatech.pmapi.sys.model.vo.UserGuidanceVO;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Classname UserGuidanceController
 * @Description
 * @Date 2023/8/8 13:46
 * @Author PoffyZhang
 */
@Slf4j
@Validated
@RestController
@RequestMapping("/api/v1/sys/user-guidanc")
@Api(value = "UserGuidance", tags = "用户引导")
@RequiredArgsConstructor
public class UserGuidanceController {

    private final UserGuidanceManage userGuidanceManage;

    @ApiOperation(value = "获取当前用户单位的一些配置是否完成", notes = "获取当前用户单位的一些配置是否完成")
    @GetMapping("/detail")
    public UserGuidanceVO detail() {
        UserInfoDetails user = LoginUserUtil.loginUserDetail();
        return userGuidanceManage.detailUserGuidance(user);
    }

}
