package com.dhcc.finance.main.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.dhcc.common.model.CurrencyMeta;
import com.dhcc.common.model.response.RestfulResponse;
import com.dhcc.finance.constant.MsConfigConsts;
import com.dhcc.finance.main.service.CwReverseOperationService;

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

@RestController
@RequestMapping(value = MsConfigConsts.MS_API_PREFIX + CwReverseOperationController.API_PREFIX, 
  	          produces = {MediaType.APPLICATION_JSON_UTF8_VALUE }, consumes = { MediaType.APPLICATION_JSON_UTF8_VALUE })
@Api(value = "反向操作登记controller", tags = { "反向操作登记操作接口" })
public class CwReverseOperationController {
	public static final String API_PREFIX = "/cw_reverse_operation";
	
	@Autowired
	CwReverseOperationService cwReverseOperationService;
	
	/**
	 * 功能描述 查询反向操作数量
	 * @param reverseType
	 * @return RestfulResponse<Integer,CurrencyMeta>
	 * @author huangpeng
	 * @date 2019年7月5日 下午2:01:56
	 * 修改日志
	 */
	@ApiOperation(value = "查询反向操作数量", notes = "", produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = MediaType.ALL_VALUE)
    @ApiImplicitParam(name = "reverseType", value = "反向操作类型", required = true, dataType = "String", paramType="query")
	@RequestMapping(value = { "/searchCwReverseOperationCount" }, method = RequestMethod.GET, consumes = MediaType.ALL_VALUE)
	public RestfulResponse<Integer, CurrencyMeta> searchCwReverseOperationCount(@RequestParam(value="reverseType") String reverseType){
		return cwReverseOperationService.searchCwReverseOperationCount(reverseType);
	}
}
