Commit 199c8173 by 崔彦峰

fix(goods): 修复商品标识键构建逻辑

- 移除无效的商品升级数据检查逻辑
- 简化商品标识键生成流程
- 避免空指针异常风险
- 统一返回行索引作为标识键
1 parent 4b87b740
...@@ -2203,14 +2203,14 @@ public class GoodsListingSubmitService { ...@@ -2203,14 +2203,14 @@ public class GoodsListingSubmitService {
private String buildCommodityIdentityKey(Integer rowIndex, private String buildCommodityIdentityKey(Integer rowIndex,
CreateBusinessApproveAllImportVo row, CreateBusinessApproveAllImportVo row,
Map<Integer, UpgradeGoodsDTO> legalGoodsIndexMap) { Map<Integer, UpgradeGoodsDTO> legalGoodsIndexMap) {
UpgradeGoodsDTO upgradeGoodsDTO = legalGoodsIndexMap.get(rowIndex); /*UpgradeGoodsDTO upgradeGoodsDTO = legalGoodsIndexMap.get(rowIndex);
if (upgradeGoodsDTO != null && upgradeGoodsDTO.getId() != null) { if (upgradeGoodsDTO != null && upgradeGoodsDTO.getId() != null) {
return "ID:" + upgradeGoodsDTO.getId(); return "ID:" + upgradeGoodsDTO.getId();
} }
String commodityCode = row == null ? null : normalize(row.getUpgradeCommodityCode()); String commodityCode = row == null ? null : normalize(row.getUpgradeCommodityCode());
if (StringUtils.isNotBlank(commodityCode)) { if (StringUtils.isNotBlank(commodityCode)) {
return "CODE:" + commodityCode; return "CODE:" + commodityCode;
} }*/
return "ROW:" + rowIndex; return "ROW:" + rowIndex;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!