package org.springblade.capcancel.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springblade.capcancel.service.ICapCancelNumService;
import org.springblade.capcancel.vo.CapCancelNumVO;
import org.springblade.core.tool.api.R;
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;

import java.util.List;

/**
 * <p>
 * CAP统一失效数 前端控制器
 * </p>
 *
 * @author zbc
 * @since 2021-08-25
 */
@RestController
@RequestMapping("/capCancelNum")
@Api(value = "CAP统一失效数", tags = "CAP统一失效数")
public class CapCancelNumController {


	@Autowired
	private ICapCancelNumService capCancelNumService;


	@GetMapping("/page")
	@ApiOperation(value = "列表")
	public R page(String month) {
		if(StringUtils.isBlank(month)){
			return R.fail("参数异常");
		}
		List<CapCancelNumVO> pages = capCancelNumService.getListByMonth(month);
		return R.data(pages);
	}

}

