package org.springblade.business.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;

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.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.business.vo.FirstInformationVO;
import org.springblade.business.service.IFirstInformationService;
import org.springblade.core.boot.ctrl.BladeController;

/**
 * 首件信息记录表 控制器
 *
 * @author BladeX
 * @since 2022-06-20
 */
@RestController
@AllArgsConstructor
@RequestMapping("/firstInformation")
@Api(value = "首件信息记录表", tags = "首件信息记录表接口")
public class FirstInformationController extends BladeController {

	private final IFirstInformationService firstInformationService;

	/**
	 * 自定义分页 首件信息记录表
	 */
	@GetMapping("/page")
	@ApiOperationSupport(order = 1)
	@ApiOperation(value = "分页")
	public R<IPage<FirstInformationVO>> page(FirstInformationVO vo) {
		//创建分页信息
		Query query = new Query();
		query.setCurrent(vo.getCurrent());
		query.setSize(vo.getSize());

		return R.data(firstInformationService.selectFirstInformationPage(Condition.getPage(query), vo));
	}

	
}
