package io.hmit.controller;

import ch.qos.logback.core.pattern.ConverterUtil;
import io.hmit.annotation.Login;
import io.hmit.annotation.LoginUser;
import io.hmit.common.utils.ConvertUtils;
import io.hmit.common.utils.Result;
import io.hmit.dto.UserInfoDTO;
import io.hmit.entity.UserEntity;
import io.hmit.modules.serviceOrder.dto.PensionOrderDTO;
import io.hmit.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @Description :
 * @Author : Shen Yuanfeng
 * @Date: 2021/3/17 16:35
 */

@Slf4j
@RestController
@RequestMapping("api/user")
@Api(tags = "用户接口")
public class UserController {

    @Autowired
    private UserService userService;

    @Login
    @GetMapping("myinfo")
    @ApiOperation("信息")
    public Result<UserEntity> get(@ApiIgnore @LoginUser UserEntity user){
        user.setPassword(null);
        return new Result<UserEntity>().ok(user);
    }
}
