package org.security.trans.dataStatistics.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.security.trans.dataStatistics.dto.StatisticsDataDTO;
import org.security.trans.dataStatistics.service.RiskDataService;
import org.security.trans.dataStatistics.vo.MaterialDataVO;
import org.security.trans.dataStatistics.vo.RiskDataVO;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
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;

/**
 * @author ：wzf
 * @apiNote ：风险提示数据统计
 * @since ：Created in 2022/11/24 10:27
 */
@RestController
@AllArgsConstructor
@RequestMapping("/statistics/risk")
public class RiskDataController {

	private final RiskDataService riskDataService;


	/**
	 * 统计列表
	 */
	@PostMapping("/table")
	@ApiOperationSupport(order = 1)
	@ApiOperation(value = "统计列表", notes = "statisticsDataDTO")
	public R<IPage<RiskDataVO>> getTableData(@RequestBody StatisticsDataDTO statisticsDataDTO, Query query) {
		return R.data(riskDataService.getTableData(statisticsDataDTO, Condition.getPage(query)));
	}
}
