Ver Fonte

新增发票地址返回

DESKTOP-VAEGFGM\zqc há 10 meses atrás
pai
commit
4ee13f2cbc

+ 3 - 1
citu-module-member/citu-module-member-api/src/main/java/com/citu/module/member/enums/ErrorCodeConstants.java

@@ -59,12 +59,14 @@ public interface ErrorCodeConstants {
     ErrorCode INVOICE_TITLE_NOT_EXISTS = new ErrorCode(1_004_013_001, "发票抬头不存在");
 
 
-    ErrorCode INVOICE_LIST_NOT_EXISTS = new ErrorCode(1_004_014_001, "发票清单不存在");
+    ErrorCode INVOICE_LIST_NOT_EXISTS = new ErrorCode(1_004_014_001, "发票不存在");
 
     ErrorCode INVOICE_LIST_ORDER_NOT_EXISTS = new ErrorCode(1_004_014_002, "待发票的订单不存在");
 
     ErrorCode INVOICE_EXISTS = new ErrorCode(1_004_014_003, "已经存在开发票的记录!");
 
+    ErrorCode INVOICE_STATUS_ERROR = new ErrorCode(1_004_014_003, "发票已处理,请刷新");
+
 
 
 

+ 4 - 0
citu-module-member/citu-module-member-biz/src/main/java/com/citu/module/member/controller/app/invoice/vo/InvoiceListRespVO.java

@@ -47,4 +47,8 @@ public class InvoiceListRespVO {
     @ExcelProperty("支付订单id")
     private Integer payOrderId;
 
+    @Schema(description = "发票文件地址")
+    @ExcelProperty("发票文件地址")
+    private String fileUrl;
+
 }

+ 9 - 0
citu-module-member/citu-module-member-biz/src/main/java/com/citu/module/member/service/invoice/InvoiceListServiceImpl.java

@@ -113,6 +113,15 @@ public class InvoiceListServiceImpl implements InvoiceListService {
 
     @Override
     public Object invoiceStatusUpdate(InvoiceStatusUpdateReqVo reqVo) {
+        InvoiceListDO invoiceListDO = invoiceListMapper.selectById(reqVo.getId());
+        if(null == invoiceListDO){
+            throw  exception(INVOICE_LIST_NOT_EXISTS);
+        }
+
+        if(!invoiceListDO.getStatus().equals(0)){
+            throw exception(INVOICE_STATUS_ERROR);
+        }
+
         int update = invoiceListMapper.update(null, new LambdaUpdateWrapper<InvoiceListDO>()
                 .eq(InvoiceListDO::getId, reqVo.getId()).set(InvoiceListDO::getFileUrl, reqVo.getFileUrl()).set(InvoiceListDO::getStatus, reqVo.getStatus()));