diff --git a/lingxing/src/main/java/common/ecommerce/lingxing/platform/shein/product/SheinProductSource.java b/lingxing/src/main/java/common/ecommerce/lingxing/platform/shein/product/SheinProductSource.java
index acc6848..e5ac2bc 100644
--- a/lingxing/src/main/java/common/ecommerce/lingxing/platform/shein/product/SheinProductSource.java
+++ b/lingxing/src/main/java/common/ecommerce/lingxing/platform/shein/product/SheinProductSource.java
@@ -7,7 +7,6 @@ import common.ecommerce.lingxing.http.LingxingEnvelope;
import common.ecommerce.lingxing.platform.LingxingCall;
import common.ecommerce.lingxing.platform.product.LingxingProductSource;
import common.ecommerce.lingxing.platform.shein.dto.SheinListingDto;
-import common.ecommerce.lingxing.platform.shein.dto.SheinSupplyPriceDto;
import common.ecommerce.model.ChannelProvider;
import common.ecommerce.model.product.ProductListing;
import common.ecommerce.model.product.ProductQuery;
@@ -84,7 +83,7 @@ public final class SheinProductSource implements LingxingProductSource {
*
imageUrls ← {@code imgUrl},为空时依次回落 {@code imgMediumUrl} / {@code imgSmallUrl}
* status ← {@code status}(0 删除 / 1 在售 / 2 停售)
* rawStatus ← 原始 {@code status} 值
- * price ← {@code salePrice} + {@code saleCurrency}(符号按约定映射)
+ * price ← {@code salePrice} + {@code saleCurrency}(只做币种符号映射,不做兜底)
* listedAt / updatedAt ← 无(接口不返回时间字段)
* attributes ← 其余全部原始字段
*
@@ -93,9 +92,6 @@ public final class SheinProductSource implements LingxingProductSource {
String image = firstNonBlank(dto.getImgUrl(), dto.getImgMediumUrl(), dto.getImgSmallUrl());
String currency = currencyOf(dto.getSaleCurrency());
String priceText = amountOf(dto.getSalePrice());
- if (priceText == null) {
- priceText = currentSupplyPrice(dto.getSupplyPriceList());
- }
return ProductListing.builder()
.platform(call.ctx().platform())
@@ -130,36 +126,6 @@ public final class SheinProductSource implements LingxingProductSource {
}
}
- /** 供货价兜底:优先 endStr 为空,否则取 beginStr 最大的一条。 */
- private static String currentSupplyPrice(List prices) {
- if (prices == null || prices.isEmpty()) {
- return null;
- }
- SheinSupplyPriceDto best = null;
- for (SheinSupplyPriceDto p : prices) {
- if (p == null || p.getPrice() == null) {
- continue;
- }
- if (p.getEndStr() == null || p.getEndStr().trim().isEmpty()) {
- return p.getPrice().toPlainString();
- }
- if (best == null || compareBegin(p.getBeginStr(), best.getBeginStr()) > 0) {
- best = p;
- }
- }
- return best == null ? null : best.getPrice().toPlainString();
- }
-
- private static int compareBegin(String a, String b) {
- if (a == null) {
- return b == null ? 0 : -1;
- }
- if (b == null) {
- return 1;
- }
- return a.compareTo(b);
- }
-
/** salePrice 文档为 number,但示例可能是字符串,统一转字符串。 */
private static String amountOf(Object value) {
if (value == null) {
diff --git a/lingxing/src/main/java/common/ecommerce/lingxing/platform/temu/product/TemuProductSource.java b/lingxing/src/main/java/common/ecommerce/lingxing/platform/temu/product/TemuProductSource.java
index 226f5bd..4fbec5b 100644
--- a/lingxing/src/main/java/common/ecommerce/lingxing/platform/temu/product/TemuProductSource.java
+++ b/lingxing/src/main/java/common/ecommerce/lingxing/platform/temu/product/TemuProductSource.java
@@ -7,12 +7,10 @@ import common.ecommerce.lingxing.http.LingxingEnvelope;
import common.ecommerce.lingxing.platform.LingxingCall;
import common.ecommerce.lingxing.platform.product.LingxingProductSource;
import common.ecommerce.lingxing.platform.temu.dto.TemuListingDto;
-import common.ecommerce.lingxing.platform.temu.dto.TemuSupplyPriceDto;
import common.ecommerce.model.ChannelProvider;
import common.ecommerce.model.product.ProductListing;
import common.ecommerce.model.product.ProductQuery;
import common.ecommerce.model.product.ProductStatus;
-import common.ecommerce.model.support.Money;
import common.ecommerce.model.support.Page;
import java.time.Instant;
@@ -110,19 +108,15 @@ public final class TemuProductSource implements LingxingProductSource {
* imageUrls ← {@code imgUrl}(单张,可能为空串)
* status ← {@code status}(0 删除 / 2 正常)
* rawStatus ← 原始 {@code status} 值
- * price / currency ← 当前生效的 {@code supplyPriceList} 条目(见下)
+ * price / currency ← 接口不返回商品价格字段,一律为 null;
+ * 申报价与活动价原值在 {@code attributes} 中
* listedAt / updatedAt ← 无(接口不返回时间字段)
* attributes ← 其余全部原始字段(SKC/SPU、仓库库存、活动价、JIT 模式等)
*
*
- * 价格说明:Temu 要求上报「申报价」,{@code supplyPriceList} 按时间区间分段,
- * 取 {@code endStr} 为空(当前生效)或开始时间最晚的一条。
- * 币种按约定:{@code ¥} 符号视为日元,ISO 代码 {@code CNY} 视为人民币。
+ * SDK 只做转发,不挑选生效区间、不做价格计算。
*/
private ProductListing toProductListing(TemuListingDto dto, LingxingCall call) {
- TemuSupplyPriceDto price = currentSupplyPrice(dto.getSupplyPriceList());
- String currency = price == null ? null : currencyOf(price.getCurrency());
-
return ProductListing.builder()
.platform(call.ctx().platform())
.omsStoreId(call.ctx().omsStoreId())
@@ -134,43 +128,13 @@ public final class TemuProductSource implements LingxingProductSource {
: Collections.singletonList(dto.getImgUrl().trim()))
.status(statusOf(dto.getStatus()))
.rawStatus(dto.getStatus() == null ? null : String.valueOf(dto.getStatus()))
- .price(price == null ? null : moneyOrNull(price.getPrice(), currency))
- .currency(currency)
+ .price(null)
+ .currency(null)
.attributes(attributesOf(dto))
.sourceProvider(ChannelProvider.LINGXING)
.build();
}
- /** 当前生效的申报价:优先 endStr 为空,否则取 beginStr 最大的一条。 */
- private static TemuSupplyPriceDto currentSupplyPrice(List prices) {
- if (prices == null || prices.isEmpty()) {
- return null;
- }
- TemuSupplyPriceDto best = null;
- for (TemuSupplyPriceDto p : prices) {
- if (p == null || p.getPrice() == null) {
- continue;
- }
- if (isBlank(p.getEndStr())) {
- return p;
- }
- if (best == null || compareBegin(p.getBeginStr(), best.getBeginStr()) > 0) {
- best = p;
- }
- }
- return best;
- }
-
- private static int compareBegin(String a, String b) {
- if (a == null) {
- return b == null ? 0 : -1;
- }
- if (b == null) {
- return 1;
- }
- return a.compareTo(b);
- }
-
/** Temu 状态:0 删除,2 正常。 */
private static ProductStatus statusOf(Integer status) {
if (status == null) {
@@ -222,38 +186,6 @@ public final class TemuProductSource implements LingxingProductSource {
return attrs;
}
- /** 货币符号 → ISO;¥/¥ 人民币与日元无法区分,返回 null。 */
- private static String currencyOf(String icon) {
- if (icon == null) {
- return null;
- }
- String s = icon.trim();
- if ("$".equals(s) || "US$".equals(s)) {
- return "USD";
- }
- if ("€".equals(s)) {
- return "EUR";
- }
- if ("£".equals(s)) {
- return "GBP";
- }
- if ("¥".equals(s) || "¥".equals(s)) {
- // 约定:¥ 符号按日元处理;人民币由平台以 ISO 代码 CNY 返回
- return "JPY";
- }
- if ("CNY".equalsIgnoreCase(s) || "RMB".equalsIgnoreCase(s)) {
- return "CNY";
- }
- return null;
- }
-
- private static Money moneyOrNull(java.math.BigDecimal amount, String currency) {
- if (amount == null || currency == null) {
- return null;
- }
- return Money.of(amount, currency);
- }
-
private static boolean isBlank(String v) {
return v == null || v.trim().isEmpty();
}