package org.springblade.audit.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springblade.audit.service.IAuditStreamDetailService;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.customer.entity.CustomerReport;
import org.springblade.customer.query.CustomerReportQuery;
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.RestController;

/**
 * <p>
 * 客服数据表 前端控制器
 * </p>
 *
 * @author zbc
 * @since 2021-12-10
 */
@RestController
@RequestMapping("/audit/stream")
@Api(value = "暂估数据记录管理", tags = "暂估数据记录接口")
public class AuditStreamDetailController {

	@Autowired
	private IAuditStreamDetailService auditStreamDetailService;

	@GetMapping("/page")
	@ApiOperation(value = "分页")
	public R<IPage<CustomerReport>> page(CustomerReportQuery pageQuery, Query query) {
		IPage<CustomerReport> page = Condition.getPage(query);
		IPage<CustomerReport> pages = auditStreamDetailService.getPageByQuery(page, pageQuery);
		return R.data(pages);
	}

}

