package net.northking.cctp.dataPool.api.dataSets;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.northking.cctp.dataPool.api.dataSets.service.DataSetEnvRelApiService;
import net.northking.cctp.dataPool.dto.dataSets.AtuScriptInputSetQuoteFieldDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/pub")
@Api(tags = "数据集管理无token请求")
public class DataSetsPubCtrl {

    @Autowired
    private DataSetEnvRelApiService setEnvRelApiService;

    @ApiOperation(value = "查询单元格的引用（pub）")
    @PostMapping(value = "/query/selectDataUrlAndTreeName",
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE,
            consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public AtuScriptInputSetQuoteFieldDto selectDataUrlAndTreeName(@RequestBody AtuScriptInputSetQuoteFieldDto atuScriptInputSetQuoteFieldDto){
        return setEnvRelApiService.selectDataUrlAndTreeName(atuScriptInputSetQuoteFieldDto);
    }
}
