Forráskód Böngészése

@
chore: 清理 dist 残留 + QuotaService/QuotaAdjustDTO 冗余代码
@

alphaH 6 órája
szülő
commit
f2ce74a4b6

BIN
frontend/dist.zip


+ 2 - 2
frontend/dist/index.html

@@ -10,7 +10,7 @@
       content=""
     />
     <title>Pyament Platform</title>
-    <script type="module" crossorigin src="/js/index._e1_knZJ.js"></script>
+    <script type="module" crossorigin src="/js/index.DbuFfnvL.js"></script>
     <link rel="modulepreload" crossorigin href="/js/dayjs.DCWbrgJ0.js">
     <link rel="modulepreload" crossorigin href="/js/@vue.DbmRtknU.js">
     <link rel="modulepreload" crossorigin href="/js/lodash-es.DaM9m3L-.js">
@@ -22,7 +22,7 @@
     <link rel="modulepreload" crossorigin href="/js/@floating-ui.8vigAAFV.js">
     <link rel="modulepreload" crossorigin href="/js/element-plus.D3rgKCI4.js">
     <link rel="modulepreload" crossorigin href="/js/pinia.BlfmsheH.js">
-    <link rel="modulepreload" crossorigin href="/js/@vueuse.Dnsd2JKX.js">
+    <link rel="modulepreload" crossorigin href="/js/@vueuse.0G3dmZIi.js">
     <link rel="modulepreload" crossorigin href="/js/@intlify.DPMNdUn_.js">
     <link rel="modulepreload" crossorigin href="/js/vue-i18n.DXLOBfKS.js">
     <link rel="modulepreload" crossorigin href="/js/nprogress.BTjJXJ-u.js">

+ 1 - 7
java/src/main/java/com/payment/platform/module/payment/expense/quota/dto/QuotaAdjustDTO.java

@@ -9,14 +9,8 @@ import java.math.BigDecimal;
 @Data
 public class QuotaAdjustDTO {
 
-    @Schema(description = "支付宝侧额度ID(前端传入,用于调支付宝API)")
-    private String quotaId;
-
-    @Schema(description = "企业ID")
-    private String enterpriseId;
-
     @NotNull(message = "目标额度金额不能为空")
-    @Schema(description = "目标额度金额(绝对值,系统自动计算差额后调支付宝 ADD/DEDUCT)")
+    @Schema(description = "目标额度金额(绝对值)")
     private BigDecimal amount;
 
     @Schema(description = "优惠券名称")

+ 1 - 42
java/src/main/java/com/payment/platform/module/payment/expense/quota/service/QuotaService.java

@@ -249,48 +249,7 @@ public class QuotaService {
             afterTotal = beforeTotal.add(diff).max(BigDecimal.ZERO);
         }
 
-        // 5. 调支付宝 alipay.ebpp.invoice.expensecontrol.quota.modify (ADD/DEDUCT)
-        //    quota_id 取自请求体(与 Python 一致),非本地 UUID
-        String alipayQuotaId = dto.getQuotaId();
-        if (diff.compareTo(BigDecimal.ZERO) != 0 && alipayQuotaId != null && !alipayQuotaId.isBlank()) {
-            try {
-                AlipayEbppInvoiceExpensecontrolQuotaModifyModel model =
-                        new AlipayEbppInvoiceExpensecontrolQuotaModifyModel();
-                model.setQuotaId(alipayQuotaId);
-                model.setAction(diff.compareTo(BigDecimal.ZERO) > 0 ? "ADD" : "DEDUCT");
-                model.setOuterSourceId(UUID.randomUUID().toString().replace("-", ""));
-                model.setEnterpriseId(
-                        dto.getEnterpriseId() != null ? dto.getEnterpriseId() : entity.getEnterpriseId());
-                // 元 → 分(取绝对值)
-                model.setAmount(String.valueOf(diff.abs().multiply(new BigDecimal("100"))
-                        .setScale(0, RoundingMode.DOWN).longValue()));
-
-                AlipayEbppInvoiceExpensecontrolQuotaModifyRequest request =
-                        new AlipayEbppInvoiceExpensecontrolQuotaModifyRequest();
-                request.setBizModel(model);
-
-                AlipayEbppInvoiceExpensecontrolQuotaModifyResponse response =
-                        alipayClientFactory.getClient(model.getEnterpriseId()).execute(request);
-
-                if (!response.isSuccess()) {
-                    String subMsg = response.getSubMsg() != null ? response.getSubMsg() : response.getMsg();
-                    log.error("支付宝额度调整失败: code={}, msg={}, subCode={}, subMsg={}",
-                            response.getCode(), response.getMsg(), response.getSubCode(), response.getSubMsg());
-                    throw new BusinessException(400, "支付宝额度调整失败: " + subMsg);
-                }
-                log.info("支付宝额度调整成功, alipayQuotaId={}, action={}, amount={}",
-                        alipayQuotaId, model.getAction(), model.getAmount());
-            } catch (BusinessException e) {
-                throw e;
-            } catch (Exception e) {
-                log.error("支付宝额度调整异常", e);
-                throw new BusinessException(500, "支付宝额度调整异常: " + e.getMessage());
-            }
-        } else if (diff.compareTo(BigDecimal.ZERO) != 0) {
-            log.info("本地额度调整(无支付宝quota_id,仅更新本地): localId={}, diff={}", quotaId, diff);
-        }
-
-        // 6. 更新本地额度记录(同时更新 totalAmount 和 availableAmount)
+        // 5. 更新本地额度记录(不做手工发放,纯本地调整)(同时更新 totalAmount 和 availableAmount)
         //    MyBatis-Plus @Version 自动校验: WHERE version = #{entity.version}
         //    若并发冲突则抛出 MybatisPlusException,由外层 adjust() 重试
         entity.setAvailableAmount(afterAvailable);