package com.unis.base.client;

import com.unis.base.common.vo.*;
import com.unis.common.utils.ResponseWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @author zoujieli
 * @version 1.0
 * @Title: MoneyMonitorFeign
 * @date 2019/9/18 18:05
 */
@FeignClient(name = "base-server")
@Component
@Api(value = "价格监测", tags = "价格监测")
public interface MoneyMonitorFeign {

	@ApiOperation(value = "价格监测-分页查询", notes = "参数：pageNum,pageSize")
	@PostMapping(value = "/moneyMonitorList/{pageNum}/{pageSize}")
	ResponseWrapper getMoneyMonitorList(@PathVariable(value = "pageNum") Integer pageNum,
											   @PathVariable(value = "pageSize") Integer pageSize);

	@ApiOperation(value = "价格监测-查询详情", notes = "参数：监测点ID")
	@GetMapping(value = "/moneyMonitorDetail/{jcdid}")
	ResponseWrapper getMoneyMonitorDetail(@PathVariable(value = "jcdid") String jcdid);

	@ApiOperation(value = "价格监测-编辑修改", notes = "参数：监测点ID")
	@PutMapping(value = "/moneyMonitor")
	ResponseWrapper updateMoneyMonitor(@RequestBody MoneyMonitorVO moneyMonitorVO);

	@ApiOperation(value = "价格监测-删除", notes = "参数：监测点ID")
	@DeleteMapping(value = "/moneyMonitor/{jcdid}")
	ResponseWrapper deleteMoneyMonitor(@PathVariable String jcdid);

	@ApiOperation(value = "价格监测-新增", notes = "参数：价格监测VO")
	@PostMapping(value = "/moneyMonitor")
	ResponseWrapper insertMoneyMonitor(@RequestBody MoneyMonitorVO moneyMonitorVO);
}
