zoujiajian 1 ano atrás
pai
commit
f29fe2949a

+ 9 - 2
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -56,7 +56,7 @@ import com.cyksj.service.order.OrderRefundService;
 import com.cyksj.service.relation.GroupRelationClearService;
 import com.cyksj.service.relation.GroupRelationFrontService;
 import com.cyksj.service.relation.GroupsRelationChangeService;
-import com.cyksj.service.relation.GroupsRelationNetflixService;
+import com.cyksj.service.translations.BackInfoTranslationsFrontService;
 import com.cyksj.service.user.UserBenefitsService;
 import com.cyksj.service.user.UserBindRelationService;
 import com.cyksj.service.user.UserLoginRecordService;
@@ -144,7 +144,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 
 	private final LumaService lumaService;
 
-	private final GroupsRelationNetflixService groupsRelationNetflixService;
+	private final BackInfoTranslationsFrontService backInfoTranslationsFrontService;
 
 	private final UserDistributeMapper userDistributeMapper;
 
@@ -245,6 +245,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 				.orderBy(RenewalView::getExpiryTime).asc()
 				.build());
 		if (list.getDataList().size() > 0) {
+			String lang = request.getHeader("lang");
 			//过滤邀请制、已失效的车位
 			Integer size = list.getTotalCount().intValue();
 			//赠送GPT日卡 参与平台ids
@@ -344,6 +345,12 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 						ticket.setIsComplete(orderDon.getStatus() == OrderDon.Status.complete ? true : false);
 					}
 				}
+				if (lang != null && !StrUtil.equals(UserPageLanguage.Language.zh_CN.name(), lang)) {
+					String languageSpecVal = backInfoTranslationsFrontService.getLanguageSpecVal(ticket.getSkuId(), lang);
+					if (StrUtil.isNotBlank(languageSpecVal)) {
+						ticket.setSpecVal(languageSpecVal);
+					}
+				}
 
 				if (size > 1 && ticket.getGoodsId() != 18) {
 					Date payTime = null;

+ 2 - 0
netflix-service/src/main/java/com/cyksj/service/translations/BackInfoTranslationsFrontService.java

@@ -42,4 +42,6 @@ public interface BackInfoTranslationsFrontService {
 	void setListCategoryNameLanguage(List<GoodsDonCategoryFrontView> list, String lang);
 
 	String getCategoryNameLanguage(Long category, String lang);
+
+	String getLanguagePayDesc(Long goodsId, String lang);
 }

+ 16 - 0
netflix-service/src/main/java/com/cyksj/service/translations/impl/BackInfoTranslationsFrontServiceImpl.java

@@ -232,4 +232,20 @@ public class BackInfoTranslationsFrontServiceImpl implements BackInfoTranslation
 		if (categoryName != null) return categoryName.getDesp();
 		return null;
 	}
+
+	@Override
+	public String getLanguagePayDesc(Long goodsId, String lang) {
+		if (StrUtil.isEmpty(lang)) {
+			return null;
+		}
+		BackInfoTranslations goodsL = backInfoTranslationsMapper.selectOne(Wrappers.lambdaQuery(BackInfoTranslations.class)
+				.eq(BackInfoTranslations::getType, BackInfoTranslations.Type.goods.ordinal())
+				.eq(BackInfoTranslations::getFuncId, goodsId)
+				.eq(BackInfoTranslations::getLang, lang)
+				.eq(BackInfoTranslations::getFieldName, "payDesc"));
+		if (goodsL != null) {
+			return goodsL.getDesp();
+		}
+		return null;
+	}
 }

+ 12 - 0
netflix-web/src/main/java/com/cyksj/web/controller/group/GroupRelationController.java

@@ -44,6 +44,7 @@ import com.cyksj.service.mange.ticket.TicketAdvertiseConfigClickRecordService;
 import com.cyksj.service.order.OrderDonService;
 import com.cyksj.service.relation.GroupRelationFrontService;
 import com.cyksj.service.relation.GroupsRelationNetflixService;
+import com.cyksj.service.translations.BackInfoTranslationsFrontService;
 import com.cyksj.service.user.UserBindRelationService;
 import com.cyksj.service.user.UserService;
 import com.cyksj.web.util.StpUserUtil;
@@ -142,6 +143,8 @@ public class GroupRelationController {
 
     private final ClaudeUserMapper claudeUserMapper;
 
+    private final BackInfoTranslationsFrontService backInfoTranslationsFrontService;
+
     private final static Sequence SEQUENCE = new Sequence(0);
 
     @RequestMapping("/get/renewal")
@@ -1006,6 +1009,7 @@ public class GroupRelationController {
                 }
             }
         }
+        String lang = request.getHeader("lang");
         List<RenewUpgradePackageFrontView> renewUpgradePackageFrontViews = beanSearcher.searchAll(RenewUpgradePackageFrontView.class, MapUtils.builder().field(RenewUpgradePackageFrontView::getSkuId, skuId).build());
         renewUpgradePackageFrontViews.forEach(renew -> {
             try {
@@ -1037,6 +1041,14 @@ public class GroupRelationController {
                             .field(RenewUpgradePackageFrontView.RenewSkuView::getGptLimitTime, minTime.get()).op(LessEqual.class)
                             .field(RenewUpgradePackageFrontView.RenewSkuView::getSkuId, upgradeSkuIds).op(Operator.InList)
                             .build());
+                    if (lang != null && !StrUtil.equals(UserPageLanguage.Language.zh_CN.name(), lang)) {
+                        renewSkuViews.forEach(renewSku->{
+                            String languageSpecVal = backInfoTranslationsFrontService.getLanguageSpecVal(renewSku.getSkuId(), lang);
+                            if (StrUtil.isNotBlank(languageSpecVal)) {
+                                renewSku.setSpecVal(languageSpecVal);
+                            }
+                        });
+                    }
                 }
                 renew.setRenewSkus(renewSkuViews);
             } catch (Exception e) {

+ 4 - 0
netflix-web/src/main/java/com/cyksj/web/controller/payment/OrderController.java

@@ -571,6 +571,10 @@ public class OrderController {
             if (StrUtil.isNotBlank(languageSpecVal)) {
                 orderDonView.setSpecVal(languageSpecVal);
             }
+            String languagePayDesc = backInfoTranslationsFrontService.getLanguagePayDesc(orderDonView.getGoodsId(), lang);
+            if (StrUtil.isNotBlank(languagePayDesc)) {
+                orderDonView.setPayDesc(languagePayDesc);
+            }
         }
 
         return GatewayResponse.SUCCESS.newBuilder().toResult(orderDonView);