package com.unis.base.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.unis.base.common.vo.TyHtxxVO;
import com.unis.common.utils.ResponseWrapper;

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

/**
 * @author huangxing
 * @version 1.0
 * @Title: BaseFeign
 * @ProjectName Base-Service
 * @Description:base层fegin接口
 * @date 2019/7/7 18:05
 */
@FeignClient(name = "base-server")
@Component
@Api(value = "合同信息", tags = "合同信息维护")
public interface ContractFeign {

	@ApiOperation(value = "合同信息列表", notes = "参数：")
	@PostMapping(value = "/contractList")
    public ResponseWrapper getTyHtxxList(@RequestBody TyHtxxVO tyHtxxVO);
	
	
	@ApiOperation(value = "分页获取合同信息列表", notes = "参数：")
	@PostMapping(value = "/contractPage/{pageNum}/{pageSize}")
    public ResponseWrapper getTyHtxxPage(@RequestBody TyHtxxVO tyHtxxVO ,@PathVariable("pageNum")Integer pageNum,@PathVariable("pageSize") Integer pageSize);
	
	
	@PostMapping(value = "/contract")
	@ApiOperation(value = "新增合同信息", notes = "参数：")
    public ResponseWrapper insert(@RequestBody TyHtxxVO tyHtxxVO);
	
	
	@PutMapping(value = "/contract")
	@ApiOperation(value = "更新合同信息", notes = "参数：")
    public ResponseWrapper update(@RequestBody TyHtxxVO tyHtxxVO);
	
	
	@DeleteMapping(value="/contract/{htxxid}")
	@ApiOperation(value = "根据合同信息id删除合同信息", notes = "参数：")
	public ResponseWrapper delete(@PathVariable("htxxid") String htxxid);
	
	
	@GetMapping(value="/contract/{htxxid}")
	@ApiOperation(value = "根据合同编号获取合同信息", notes = "参数：")
	public ResponseWrapper getHtxxByHtxxid(@PathVariable("htxxid") String htxxid);
}
