package com.heyu.api.controller.vv;


import com.heyu.api.alibaba.request.vv.AppBuyerRequest;
import com.heyu.api.common.annotation.AppRealyLogin;
import com.heyu.api.common.annotation.Describe;
import com.heyu.api.data.dao.vv.VvBuyerDao;
import com.heyu.api.data.entity.vv.VvBuyerEntity;
import com.heyu.api.data.utils.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@RestController
@RequestMapping("/app/buyer")
public class AppBuyerController {


    @Autowired
    private VvBuyerDao vvBuyerDao;

    /***
     * 列表
     * /app/buyer/info
     */
    @Describe("我的信息")
    @RequestMapping("/info")
    @AppRealyLogin
    public R list(@RequestBody AppBuyerRequest request) {
        VvBuyerEntity vvBuyerEntity = vvBuyerDao.selectVvBuyerById(request.getBuyerId());
        return R.ok().setData(vvBuyerEntity);
    }
}
