zoujiajian před 11 měsíci
rodič
revize
1d5c713325

+ 5 - 0
netflix-common/src/main/java/com/cyksj/common/constant/Constant.java

@@ -698,4 +698,9 @@ public interface Constant {
 	 * nano推广标识
 	 */
 	String NANO_DISTRIBUTE_MARK = "nano";
+
+	/**
+	 * 推广claude code分销链接
+	 */
+	String DISTRIBUTE_NANO_URL = "https://nano.yhlxj.com/%s";
 }

+ 5 - 1
netflix-web/src/main/java/com/cyksj/web/controller/cps/CpsPopularizeController.java

@@ -118,10 +118,14 @@ public class CpsPopularizeController {
 		SearchResult<UserDistributePopularizeView> search = beanSearcher.search(UserDistributePopularizeView.class, builder.build());
 		search.getDataList().forEach(data -> {
 			if (StrUtil.isNotBlank(data.getOtherUrl())) {
-				if ("cc".equals(data.getOtherUrl())) {
+				if (Constant.CC_DISTRIBUTE_MARK.equals(data.getOtherUrl())) {
 					data.setPopularizeLink(String.format(Constant.DISTRIBUTE_CLAUDE_CODE_CC_URL, data.getCode()));
 					//对应优惠码
 					data.setCouponCode(couponDistributePopularizeMapper.getCouponCodeByUid(cpsUserId, Constant.DISTRIBUTE_CLAUDE_CODE_COUPON_ID));
+				} else if (Constant.NANO_DISTRIBUTE_MARK.equals(data.getOtherUrl())) {
+					data.setPopularizeLink(String.format(Constant.DISTRIBUTE_NANO_URL, data.getCode()));
+					//对应优惠码
+					data.setCouponCode(couponDistributePopularizeMapper.getCouponCodeByUid(cpsUserId, Constant.DISTRIBUTE_NANO_COUPON_ID));
 				}
 			}
 			if (StrUtil.isEmpty(data.getPopularizeLink())) {