Commit 63cc252e by 崔彦峰

fix(goods): 修复权益服务项目验证逻辑

- 添加供应商代码和商品类型的条件判断
- 引入环境配置属性解析商品类型列表
- 仅当供应商为22且商品类型匹配时才验证权益服务项目
- 移除原有的简单非空检查逻辑
- 添加注释掉的旧验证代码以备参考
1 parent 48725818
......@@ -1034,11 +1034,19 @@ public class GoodsListingSubmitService {
if (!isSceneEquity(submitDTO.getBaseSceneCode()) || !hasDirectSalesMerchant(merchantRowIndexMap)) {
return true;
}
if (CollectionUtils.isNotEmpty(upgradeGoodsDTO.getUpgradeGoodsServiceItemsList())) {
return true;
List<Integer> goodsTypes = parseCsvIntegerProperty(
env.getProperty("smartcarlife.goodsType.equity", "126"));
if (Objects.equals(upgradeGoodsDTO.getGoodsInfo().getSupplierCode(), "22")
&& goodsTypes.contains(upgradeGoodsDTO.getGoodsInfo().getGoodsType())
&& CollectionUtils.isEmpty(upgradeGoodsDTO.getUpgradeGoodsServiceItemsList())) {
setLineError(errorList, "权益服务项目缺失", rowIndex);
return false;
}
setLineError(errorList, "权益服务项目缺失", rowIndex);
return false;
// if (CollectionUtils.isNotEmpty(upgradeGoodsDTO.getUpgradeGoodsServiceItemsList())) {
// return true;
// }
// setLineError(errorList, "权益服务项目缺失", rowIndex);
return true;
}
private boolean hasDirectSalesMerchant(Map<Integer, CreateBusinessApproveMerchantDTO> merchantRowIndexMap) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!