ソースを参照

Merge branch 'master' into pre

zoujiajian 1 ヶ月 前
親
コミット
18e4838775

+ 12 - 0
netflix-service/src/main/java/com/cyksj/service/codex/impl/CodexServiceImpl.java

@@ -396,6 +396,13 @@ public class CodexServiceImpl implements CodexService {
 			if (orderDonGalaxyCoinRecord != null) {
 				orderMoney = orderMoney.add(orderDonGalaxyCoinRecord.getDeductMoney());
 			}
+			// 续费升级订单的实际价值还包含上一次升级使用的 Codex 抵扣。
+			// 若不回补这部分金额,连续升级时抵扣金额会逐级变少。
+			CodexDeductRecord renewCodexDeductRecord = codexDeductRecordMapper.selectOne(Wrappers.lambdaQuery(CodexDeductRecord.class)
+					.eq(CodexDeductRecord::getOrderId, renewOrderDon.getId()).last("limit 1"));
+			if (renewCodexDeductRecord != null) {
+				orderMoney = orderMoney.add(Optional.ofNullable(renewCodexDeductRecord.getDeductMoney()).orElse(BigDecimal.ZERO));
+			}
 			GoodsDonSku presentSku = skuMapper.selectById(renewSkuId);
 			if (orderMoney.compareTo(BigDecimal.ZERO) == 0) {
 				orderMoney = presentSku.getPrice();
@@ -427,6 +434,11 @@ public class CodexServiceImpl implements CodexService {
 				Long skuId = thisRenewOrderDon.getSkuId();
 				GoodsDonSku thisRenewSku = skuMapper.selectById(skuId);
 				BigDecimal thisOrderMoney = thisRenewOrderDon.getMoney().add(Optional.ofNullable(thisRenewOrderDon.getBalance()).orElse(BigDecimal.ZERO));
+				CodexDeductRecord thisRenewCodexDeductRecord = codexDeductRecordMapper.selectOne(Wrappers.lambdaQuery(CodexDeductRecord.class)
+						.eq(CodexDeductRecord::getOrderId, thisRenewOrderDon.getId()).last("limit 1"));
+				if (thisRenewCodexDeductRecord != null) {
+					thisOrderMoney = thisOrderMoney.add(Optional.ofNullable(thisRenewCodexDeductRecord.getDeductMoney()).orElse(BigDecimal.ZERO));
+				}
 				if (thisOrderMoney.compareTo(BigDecimal.ZERO) == 0) {
 					thisOrderMoney = thisRenewSku.getPrice();
 				}

+ 1 - 3
netflix-service/src/main/java/com/cyksj/service/mail/impl/CommonMailServiceImpl.java

@@ -1,7 +1,6 @@
 package com.cyksj.service.mail.impl;
 
 import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.http.HttpRequest;
 import cn.hutool.http.HttpResponse;
@@ -63,8 +62,7 @@ public class CommonMailServiceImpl implements CommonMailService {
         }
         //25年的GPT账号获取验证码 特殊处理
         //获取失败走下一步
-        if (Long.valueOf(18L).equals(goodsId) && emailCreatedTime != null
-                && emailCreatedTime.compareTo(DateUtil.parse("2025-01-01")) > 0) {
+        if (Long.valueOf(18L).equals(goodsId) && emailCreatedTime != null) {
             try {
                 //获取近十封邮件
                 String url = "https://ms.lqqq.cc/web/" + account + "----" + emailPwd;