package com.liquidnet.service.platform.controller;

import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.service.other.DamaiService;
import io.swagger.annotations.ApiOperation;
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("/platform/damai")
public class PlatformDamaiController {

    @Autowired
    private DamaiService damaiService;

    @ApiOperation("同步大麦")
    @PostMapping(value = "/sync")
    public ResponseDto<Boolean> syncDamai(@RequestParam("performancesId") String performancesId) {
        boolean result = damaiService.sycPerformance(performancesId);
        return ResponseDto.success(result);
    }
}
