Browse Source

Merge branch 'develop/v1.0' into master-test

tangxiangan 3 days ago
parent
commit
0414c5b9ec

+ 1 - 1
pdf-office-payment/src/main/java/cn/kdan/cloud/pdf/office/payment/service/impl/AppStoreServiceImpl.java

@@ -87,7 +87,7 @@ public class AppStoreServiceImpl implements AppStoreService {
             result.setDigestPassword(null);
             return result;
         }
-        log.info("appStore 权益校验,用户id:{}",equityVerificationDTO.getUserId());
+        log.info("appStore 权益校验,用户id:{},请求体:{}",equityVerificationDTO.getUserId(),equityVerificationDTO);
         AppTransaction appTransaction = this.appStoreReceiptVerify(equityVerificationDTO.getTransactionId(),equityVerificationDTO.getApplePayProductId(),equityVerificationDTO.getAppBundleId());
         // 获取票据订单信息
         String transactionId = appTransaction.getTransactionId();

+ 1 - 0
pdf-office-payment/src/main/java/cn/kdan/cloud/pdf/office/payment/service/impl/PayCenterWebhookServiceImpl.java

@@ -422,6 +422,7 @@ public class PayCenterWebhookServiceImpl implements PayCenterWebhookService {
                     Order cycleOrder = new Order();
                     BeanUtil.copyProperties(ordersVOList.get(0), cycleOrder);
                     cycleOrder.setId(CommonUtils.generateId());
+                    cycleOrder.setTradeNo(cn.kdan.cloud.pdf.office.payment.utils.CommonUtils.generateRightsId((long) ((Math.random() * 9999 + 1) * 10000)));
                     cycleOrder.setThirdTradeNo(payId);
                     ordersService.save(cycleOrder);
                     // 通过thirdTradeId更新subscription

+ 6 - 1
pdf-office-payment/src/main/java/cn/kdan/cloud/pdf/office/payment/service/impl/SubscriptionsServiceImpl.java

@@ -157,7 +157,12 @@ public class SubscriptionsServiceImpl extends ServiceImpl<SubscriptionsMapper, S
         Integer platform = productVO.getPlatform();
         UpdateUserForOrderDTO successDTO = new UpdateUserForOrderDTO();
         successDTO.setUserId(subscription.getUserId());
-        successDTO.setPayTpe(PayTypeEnum.AUTO.value());
+        if(productVO.getPlatform()==1&&productVO.getAppId().equals("1")){
+            successDTO.setPayTpe(PayTypeEnum.NO_AUTO.value());
+        }else{
+            successDTO.setPayTpe(PayTypeEnum.AUTO.value());
+        }
+
         successDTO.setPlatform(platform);
         if(subscription.getSubscriptionType().equals(SubscriptionTypeEnum.TRAIL.value())){
             successDTO.setUserStatus(PDFOfficeUserSubscriptionStatusEnum.TRIAL.value());

+ 2 - 1
pdf-office-sso/src/main/java/cn/kdan/cloud/pdf/office/sso/service/impl/AuthServiceImpl.java

@@ -274,7 +274,8 @@ public class AuthServiceImpl implements AuthService {
         // 过滤掉isAi为true的记录
         List<UserSubscriptionInfoVO> filteredList = subscriptionInfoList.stream()
                 .filter(info -> info.getStatus() == 1 // 筛选出 status = 1 的记录
-                        && info.getPaymentModel().equals("1")) // 筛选出 paymentModel = 1 的记录
+                        && info.getPaymentModel().equals("1")
+                &&ObjectUtils.isEmpty(info.getIsAi())||ValidStatusEnum.INVALID.value().equals(info.getIsAi())) // 筛选出 paymentModel = 1 的记录
                 .collect(Collectors.toList());
         if (CollectionUtils.isEmpty(filteredList)){
             return false;