package com.bocloud.ims.booter.controller.resource;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.bocloud.common.annotations.Log;
import com.bocloud.common.enums.BoCloudService;
import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.GridBean;
import com.bocloud.common.model.Pager;
import com.bocloud.common.model.RequestContext;
import com.bocloud.common.utils.Common;
import com.bocloud.ims.entity.resource.ResourceEvent;
import com.bocloud.ims.interfaces.resource.ResourceEventService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/v1/events")
@Api(value = "资源监听", tags = "资源监听")
public class ResourceEventController {

	@Autowired
	private ResourceEventService resourceEventService;

	/**
	 * 列表
	 * 
	 * @param pager
	 * @return
	 */
	@ApiOperation(tags = { "CMC",
			"CSC" }, value = "查询平台资源列表",  httpMethod = "GET")
	@Log(module = BoCloudService.IMS, target = "资源监听", operation = "查看资源监听列表")
	@GetMapping
	public BocloudResult<GridBean<ResourceEvent>> list(Pager pager,
			@Value(Common.REQ_CONTEXT) RequestContext context) {
		return resourceEventService.list(pager, context);

	}

}
