From a4b5f36b41fe8e1627fd8050c9584c219c3b9e28 Mon Sep 17 00:00:00 2001 From: pangyang <475446853@qq.com> Date: Mon, 13 Jun 2022 13:43:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E7=A5=A8=E8=8E=B7=E5=8F=96=E9=93=BE?= =?UTF-8?q?=E8=A1=A8=E4=B8=8B=E7=9A=84=E5=8F=91=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../invoice/controller/InvLinkInfoController.java | 8 ++++++++ .../djy/invoice/service/InvLinkInfoService.java | 5 +++++ .../service/impl/InvLinkInfoServiceImpl.java | 14 ++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/invoice/src/main/java/com/djy/invoice/controller/InvLinkInfoController.java b/invoice/src/main/java/com/djy/invoice/controller/InvLinkInfoController.java index 90b5183..4547ba9 100644 --- a/invoice/src/main/java/com/djy/invoice/controller/InvLinkInfoController.java +++ b/invoice/src/main/java/com/djy/invoice/controller/InvLinkInfoController.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; import com.djy.core.http.HttpResult; import com.djy.invoice.dto.SendEmail; import com.djy.invoice.dto.SendEmailParams; +import com.djy.invoice.model.InvInvoiceInfo; import com.djy.invoice.model.InvLinkInfo; import com.djy.invoice.service.InvLinkInfoService; import io.swagger.v3.oas.annotations.Operation; @@ -57,6 +58,13 @@ public class InvLinkInfoController { } + @Operation(description = "获取链接下的发票") + @PostMapping("getLinkInvoice") + public HttpResult getLinkInvoice(InvLinkInfo info) { + List list = invLinkInfoService.getLinkInvoice(info); + return HttpResult.ok(list); + } + // @Operation(description = "查询发票") // @PostMapping("getInvoice") // public HttpResult getInvoice(InvLinkInfo info) { diff --git a/invoice/src/main/java/com/djy/invoice/service/InvLinkInfoService.java b/invoice/src/main/java/com/djy/invoice/service/InvLinkInfoService.java index 036d58b..da77b6b 100644 --- a/invoice/src/main/java/com/djy/invoice/service/InvLinkInfoService.java +++ b/invoice/src/main/java/com/djy/invoice/service/InvLinkInfoService.java @@ -3,8 +3,11 @@ package com.djy.invoice.service; import com.djy.core.http.HttpResult; +import com.djy.invoice.model.InvInvoiceInfo; import com.djy.invoice.model.InvLinkInfo; +import java.util.List; + public interface InvLinkInfoService { @@ -17,4 +20,6 @@ public interface InvLinkInfoService { HttpResult uploadInvoice(InvLinkInfo info); HttpResult getInvoice(InvLinkInfo info); + + List getLinkInvoice(InvLinkInfo info); } diff --git a/invoice/src/main/java/com/djy/invoice/service/impl/InvLinkInfoServiceImpl.java b/invoice/src/main/java/com/djy/invoice/service/impl/InvLinkInfoServiceImpl.java index b14371f..7f274e1 100644 --- a/invoice/src/main/java/com/djy/invoice/service/impl/InvLinkInfoServiceImpl.java +++ b/invoice/src/main/java/com/djy/invoice/service/impl/InvLinkInfoServiceImpl.java @@ -1259,6 +1259,20 @@ public class InvLinkInfoServiceImpl implements InvLinkInfoService { } + @Transactional + public List getLinkInvoice(InvLinkInfo info){ + + List invoices = new ArrayList<>(); + + List list = invInvoiceSplitMapper.getIdsBylinkdId(info.getGID()); + for(String str : list){ + InvInvoiceInfo invoice = invInvoiceInfoMapper.getByGid(str); + invoices.add(invoice); + } + + return invoices; + } + public static String getCmdName() { return cmdName; }