package com.fdkankan.feign;

import com.fdkankan.user.entity.User;
import com.fdkankan.user.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 提供计算调用
 */
@RestController
@RequestMapping("/feign")
public class ModelingFeign {

    @Autowired
    private IUserService userService;

    @PostMapping("/getUserByName")
    public User getUserByName(@RequestParam(value = "userName", required = false) String userName) {
        return userService.getUserByUserName(userName);
    }

}
