package com.atguigu.ssyx.user.api;

import com.atguigu.ssyx.user.service.UserService;
import com.atguigu.ssyx.vo.user.LeaderAddressVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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 javax.annotation.Resource;

/**
 * ClassName: LeaderAddressController
 * Package: com.atguigu.ssyx.user.api
 *
 * @author yovinchen
 * @Create 2023/9/25 12:23
 */
@Api(tags = "团长接口")
@RestController
@RequestMapping("api/user/leader")
public class LeaderAddressController {

    @Resource
    private UserService userService;

    @ApiOperation("提货点地址信息")
    @GetMapping("inner/getUserAddressByUserId/{userId}")
    public LeaderAddressVo getUserAddressByUserId(@PathVariable("userId") Long userId) {
        return userService.getLeaderAddressByUserId(userId);
    }
}
