package com.ruixuan.bytedance.controller;

import com.ruixuan.bytedance.service.IBytedanceService;
import com.ruixuan.common.core.controller.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 抖音Controller
 */

@Api(tags = "抖音Controller")
@RestController
@RequestMapping("/bytedance")
public class BytedanceController extends BaseController {

    @Autowired
    private IBytedanceService bytedanceService;


    /**
     * 新增团长活动列表
     */
    @ApiOperation(value = "新增团长活动 信息")
    @GetMapping("/addBytedanceColonelActivityList")
    public void addBytedanceColonelActivityList() {
        bytedanceService.addBytedanceColonelActivityList(1L);
    }

    /**
     * 新增团长活动详情
     */
    @ApiOperation(value = "新增团长活动详情")
    @GetMapping("/addBytedanceColonelActivityDetail")
    public void addBytedanceColonelActivityDetail(@ApiParam("活动ID") @RequestParam(value = "activityId", required = true) Long activityId) {
        bytedanceService.addBytedanceColonelActivityDetail(activityId);
    }


    /**
     * 新增活动商品
     */
    @ApiOperation(value = "新增活动商品")
    @GetMapping("/addBytedanceColonelActivityProduct")
    public void addBytedanceColonelActivityProduct(@ApiParam("活动ID") @RequestParam(value = "activityId", required = true) Long activityId,
                                                   @ApiParam("商品信息") @RequestParam(value = "productInfo", required = true) Long productInfo
    ) {
        bytedanceService.addBytedanceColonelActivityProduct(activityId, productInfo);
    }


    /**
     * 新增团长订单
     */
    @ApiOperation(value = "新增团长订单")
    @GetMapping("/addBytedanceInstituteOrderColonel")
    public void addBytedanceInstituteOrderColonel(@ApiParam("开始时间") @RequestParam(value = "startTime", required = true) String startTime,
                                                  @ApiParam("结束时间") @RequestParam(value = "endTime", required = true) String endTime
    ) {
        bytedanceService.addBytedanceInstituteOrderColonel(startTime, endTime, null);
    }


    /**
     * 新增 团长分次结算订单
     */
    @ApiOperation(value = "新增团长分次结算订单")
    @GetMapping("/addBytedanceMultiSettlementOrders")
    public void addBytedanceMultiSettlementOrders(@ApiParam("开始时间") @RequestParam(value = "startTime", required = true) String startTime,
                                                  @ApiParam("结束时间") @RequestParam(value = "endTime", required = true) String endTime
    ) {
        bytedanceService.addBytedanceMultiSettlementOrders(startTime, endTime, null);
    }


}
