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.TyLqxxVO;
import com.unis.common.utils.ResponseWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * @author zhengbodang
 * @version 1.0
 * @Title TyLqxxController
 * @ProjectName 粮情信息 TyLqxxController
 * @Description
 * @date 2019/07/22 17点26分
 */
@FeignClient(name = "base-server")
@Component
@Api(value = "粮情信息 ", tags = "粮情信息 维护")
public interface GrainSituationController {

	/**
	 * @author zhengbodang
	 * @Description 获取粮情列表
	 * @param
	 * @return 粮情列表
	 */
	@ApiOperation(value = "粮情列表", notes = "参数：")
	@PostMapping(value = "/grainSituationList")
    public ResponseWrapper getTyLqxxList(@RequestBody TyLqxxVO tyLqxxVO);

	/**
	 * @author zhengbodang
	 * @Description 分页获取粮情信息列表
	 * @param
	 * @return
	 */
	@ApiOperation(value = "分页获取粮情信息列表", notes = "参数：")
	@PostMapping(value = "/grainSituationPage/{pageNum}/{pageSize}")
    public ResponseWrapper getTyLqxxPage(@RequestBody TyLqxxVO tyLqxxVO ,@PathVariable("pageNum")Integer pageNum,@PathVariable("pageSize") Integer pageSize);

	/**
	 * @author zhengbodang
	 * @Description 新增粮情信息
	 * @param 廒间信息实体 models
	 * @return 新增状态
	 */
	@PostMapping(value = "/grainSituation")
	@ApiOperation(value = "新增粮情信息", notes = "参数：")
    public ResponseWrapper insert(@RequestBody TyLqxxVO tyLqxxVO);

	/**
	 * @author zhengbodang
	 * @Description 更新粮情信息
	 * @param
	 * @return 新增状态
	 */
	@PutMapping(value = "/grainSituation")
	@ApiOperation(value = "更新粮情信息", notes = "参数：")
    public ResponseWrapper update(@RequestBody TyLqxxVO tyLqxxVO);

	/**
	 * @author zhengbodang
	 * @Description 删除粮情信息
	 * @param
	 * @return 状态
	 */
	@DeleteMapping(value="/grainSituation/{lqid}")
	@ApiOperation(value = "根据粮情信息编号删除粮情信息", notes = "参数：")
	public ResponseWrapper delete(@PathVariable("lqid") String lqid);

	/**
	 * @author zhengbodang
	 * @Description 删除粮情信息
	 * @param
	 * @return 状态
	 */
	@GetMapping(value="/grainSituation/{lqid}")
	@ApiOperation(value = "获取粮情信息", notes = "参数：")
	public ResponseWrapper getTyLqxxByLqid(@PathVariable("lqid") String lqid);

}
