package shop.alien.store.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiOperationSupport;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import shop.alien.entity.result.R;
import shop.alien.entity.store.vo.LifeUserExpertOrderVo;
import shop.alien.store.service.LifeUserExpertOrderService;

import java.util.List;

@Api(tags = {"商户-达人推广管理"})
@Slf4j
@RestController
@CrossOrigin
@RequiredArgsConstructor
@RequestMapping("/storeUserExpertOrder")
public class StoreUserExpertOrderController {

    private final LifeUserExpertOrderService lifeUserExpertOrderService;

    @ApiOperation("商户达人推广订单列表")
    @ApiOperationSupport(order = 1)
    @GetMapping("/getTalentPromotionOrder")
    public R<List<LifeUserExpertOrderVo>> getTalentPromotionOrder(@RequestParam("orderId") String orderId,
                                                                  @RequestParam("expertId") String expertId) {
        log.info("StoreUserExpertOrderController.getTalentPromotionOrder");
        return R.data(lifeUserExpertOrderService.getTalentPromotionOrder(orderId, expertId));
    }

}
