package com.unis.base.client;

import com.unis.base.common.vo.CompanyRecordsQueryVO;
import com.unis.base.common.vo.CompanyRecordsVO;
import com.unis.common.utils.ResponseWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

/**
 * @author WangZL
 * @version 1.0
 * @Title CompanyRecordsFeign
 * @ProjectName 企业记录
 * @Description
 * @date 2019/07/22 17点26分
 */
@FeignClient(name = "base-server")
@Component
@Api(value = "企业记录", tags = "企业记录")
public interface CompanyRecordsFeign {

	@ApiOperation(value = "企业记录-分页查询列表", notes = "参数：涉粮企业备案记录ID，统一社会信用代码，备案时间（年度），是否备案")
	@PostMapping(value = "/companyRecordsPage/{pageNum}/{pageSize}")
	public ResponseWrapper getCompanyRecordsPage(@RequestBody CompanyRecordsQueryVO companyRecordsQueryVO,
			@PathVariable("pageNum")Integer pageNum,@PathVariable("pageSize") Integer pageSize) ;

	@ApiOperation(value = "企业记录-查询详情", notes = "参数：企业记录ID")
	@GetMapping(value = "/companyRecords/{qybabh}")
	public ResponseWrapper getCompanyRecordsInfoById(@PathVariable("qybabh")String qybabh) ;

	@ApiOperation(value = "企业记录-查询列表", notes = "参数：涉粮企业备案记录ID，统一社会信用代码，备案时间（年度），是否备案")
	@PostMapping(value = "/companyRecordsList")
	public ResponseWrapper getCompanyRecordsList(@RequestBody CompanyRecordsQueryVO companyRecordsQueryVO);

	@PostMapping(value = "/companyRecords")
	@ApiOperation(value = "企业记录-根据备案状态新增", notes = "参数：企业记录信息")
	public ResponseWrapper insert(@RequestBody CompanyRecordsVO companyRecordsVO) ;

	@PutMapping(value = "/companyRecords")
	@ApiOperation(value = "企业记录-更新", notes = "参数：企业记录信息")
	public ResponseWrapper update(@RequestBody CompanyRecordsVO companyRecordsVO) ;
}
