package cn.superdesk.uniorder.controller._patch.invoice;


import cn.superdesk.uniorder.common.pagination.PageQueryParam;
import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.dubbo.consumer.invoice.customer.InvoiceApplyCustomerDubboConsumerService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("/patch/invoice/apply/customer")
public class InvoiceApplyCustomerStatisticsFixController {

	@Autowired
	private InvoiceApplyCustomerDubboConsumerService invoiceApplyCustomerDubboConsumerService;

	/**
	 * 超时不用管 能正常运行
	 * http://192.168.1.223:8089/web/patch/invoice/apply/customer/run
	 *
	 * @param param
	 * @return
	 */
	@ApiOperation(value = "patch")
	@RequestMapping(value = "run", method = RequestMethod.POST)
	@ResponseBody
	public R<String> run(@RequestBody PageQueryParam param) {


		R<String> response = new R<>();

		// TODO 参数合法性判定

		invoiceApplyCustomerDubboConsumerService.patchInvoiceApplyCustomerFixV2_1();

		return response;
	}
}
