package com.bwie.user.controller;

import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import com.bwie.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Classname UserController
 * @Description TODO
 * @Created by 杨鹏
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("/userName")
    public Result  userName(@RequestBody User user){
        User user1 = userService.userName(user);
        return Result.success(user1);
    }


}
