package cn.superdesk.uniorder.controller._validated;

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.*;

/**
 * @Description: Java类作用描述
 * @Author: linjinyu
 * @CreateDate: 2020/11/13 下午5:32
 * @UpdateUser: linjinyu
 * @UpdateDate: 2020/11/13 下午5:32
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Slf4j
@RestController
@RequestMapping("/validated/invoice/apply/unified/customer")
public class CheckUnifiedCustomerInvoiceApplyController {

	@Autowired
	private InvoiceApplyCustomerDubboConsumerService invoiceApplyDubboConsumerService;

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


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

		// TODO 参数合法性判定

		invoiceApplyDubboConsumerService.validatedInvoiceApplyRelationTable();

		return response;
	}
}
