소스 검색

多邻国独立规格代充设置

zoujiajian 5 달 전
부모
커밋
9bbf12561c

+ 16 - 6
netflix-common/src/main/java/com/cyksj/common/constant/Constant.java

@@ -348,13 +348,13 @@ public interface Constant {
 	 */
 	String CODEX_ONLY_ACCOUNT = "codex123";
 
-    /**
-     * gmini
-     */
-    String GMINI_ONLY_ACCOUNT = "GeminiPro123";
+	/**
+	 * gmini
+	 */
+	String GMINI_ONLY_ACCOUNT = "GeminiPro123";
 
 
-    /**
+	/**
 	 * 免登录渠道
 	 */
 	List<String> NO_SIGN_CHANNEL_NAMES = List.of("百度", "巨量");
@@ -572,7 +572,17 @@ public interface Constant {
 	 * 代充邀请制平台
 	 * 声破天 油管
 	 */
-	List<Long> RECHARGE_INVITE_GOODS_IDS = List.of(4l, 5l);
+	List<Long> RECHARGE_INVITE_GOODS_IDS = List.of(4l, 5l, 54l);
+
+	/**
+	 * 多邻国平台ID
+	 */
+	Long DLG_GID = 54L;
+
+	/**
+	 * 多邻国独享规格ID
+	 */
+	Long DLG_DX_SKU_ID = 808L;
 
 	/**
 	 * 油管平台ID

+ 10 - 1
netflix-service/src/main/java/com/cyksj/service/exchange/impl/ExchangeCodeServiceImpl.java

@@ -413,8 +413,18 @@ public class ExchangeCodeServiceImpl extends ServiceImpl<ExchangeCodeMapper, Exc
 			});
 		}
 		relation.setOrderId(orderDon.getId());
+		//设置代充信息
+		setRelationInfoIfRecharge(relation, goodsDon, sku);
+		return relation;
+	}
+
+	private void setRelationInfoIfRecharge(GroupsRelation relation, GoodsDon goodsDon, GoodsDonSku sku) {
 		//邀请制代充平台
 		if ((goodsDon.getSpecialType() != null && goodsDon.getSpecialType() == GoodsDon.SpecialType.recharge) || Constant.RECHARGE_INVITE_GOODS_IDS.contains(goodsDon.getId())) {
+			//多邻国个人规格
+			if (goodsDon.getId() == Constant.DLG_GID && !ObjectUtil.equal(Constant.DLG_DX_SKU_ID, sku.getId())) {
+				return;
+			}
 			relation.setStartTime(null);
 			relation.setExpiryTime(null);
 			relation.setRechargeStatus(GroupsRelation.RechargeStatus.waiting);
@@ -427,7 +437,6 @@ public class ExchangeCodeServiceImpl extends ServiceImpl<ExchangeCodeMapper, Exc
 			}
 			groupsRelationMapper.updateById(relation);
 		}
-		return relation;
 	}
 
 	@Override