/*
 * Copyright (c) 京北方信息技术股份有限公司 Corporation 2022 . All rights reserved.
 *
 */
package net.northking.cctp.dw.api;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.northking.cctp.common.http.ResultWrapper;
import net.northking.cctp.dw.api.service.DwCaseDesignInfoApiService;
import net.northking.cctp.dw.dto.DwCaseDesignInfoQueryDto;
import net.northking.cctp.dw.dto.MtCaseDesignChartDetailDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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;

import java.util.List;

@Api(tags = "dw用例表")
@RequestMapping("/v1")
@RestController
public class DwCaseDesignInfoQueryCtrl {
    /**
     * 日志
     */
    private final static Logger logger = LoggerFactory.getLogger(DwCaseDesignInfoQueryCtrl.class);

    @Autowired
    private DwCaseDesignInfoApiService apiService;

    /**
     * 查询列表
     *
     * @param
     * @return 数据列表
     */
    @ApiOperation(value = "查询列表：用例设计统计图表")
    @PostMapping(value = "/list/query/MtCaseDesignCharts",
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE,
            consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public ResultWrapper<List<MtCaseDesignChartDetailDto>> listQuery(@RequestBody DwCaseDesignInfoQueryDto query) {
        ResultWrapper<List<MtCaseDesignChartDetailDto>> wrapper = new ResultWrapper<>();
        List<MtCaseDesignChartDetailDto> result = apiService.listQuery(query);
        return wrapper.success(result);
    }


}


