ecology_maven/com/api/aiyh_kafang/web/InvoiceController.java

37 lines
1.0 KiB
Java

package com.api.aiyh_kafang.web;
import aiyh.utils.ApiResult;
import com.api.aiyh_kafang.service.InvoiceService;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.util.Map;
/**
* @author EBU7-dev1-ayh
* @create 2021/9/27 0027 10:29
* 发票相关控制器
*/
@Path("/kafang/invoiceCheck")
public class InvoiceController {
private InvoiceService invoiceService = new InvoiceService();
@Path("/check/contrast")
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public String check(@Context HttpServletRequest request, @Context HttpServletResponse response,
@RequestBody Map<String, Object> params) {
Map<String, Object> result = invoiceService.contrastInvoiceInfo(params);
return ApiResult.success(result);
}
}