Commit 0ec462d9 by zhouhaibao

refactor(store): 重构费用分摊规则保存逻辑

- 调整其他费用分摊目标的处理位置
- 移除重复的其他费用分摊规则保存代码
- 优化手续费分摊规则的默认值设置
- 保持产品成本和手续费的原有处理逻辑不变
1 parent d6902187
...@@ -1787,6 +1787,14 @@ public class StoreApproveServiceImpl implements StoreApproveService { ...@@ -1787,6 +1787,14 @@ public class StoreApproveServiceImpl implements StoreApproveService {
saveDistributionRule(businessCode, baseSceneCode, goodsTypeGroupId, 2, saveDistributionRule(businessCode, baseSceneCode, goodsTypeGroupId, 2,
resourceDivideTarget, targetMerchantLevel, FeeCategoryEnum.SETTLE_RESOURCE_FEE.getValue(), "资源费", updateBy); resourceDivideTarget, targetMerchantLevel, FeeCategoryEnum.SETTLE_RESOURCE_FEE.getValue(), "资源费", updateBy);
String otherTarget = ruleDTO.getOtherFeeSettlementTarget();
Byte otherDivideTarget = parseDivideTarget(otherTarget);
if (otherDivideTarget == null) {
otherDivideTarget = 1;
}
saveDistributionRule(businessCode, baseSceneCode, goodsTypeGroupId, 2,
otherDivideTarget, targetMerchantLevel, FeeCategoryEnum.SETTLE_OTHER_FEE.getValue(), "其他费用", updateBy);
String productCostOwnership = ruleDTO.getProductCostOwnership(); String productCostOwnership = ruleDTO.getProductCostOwnership();
Byte costDivideTarget = parseDivideTarget(productCostOwnership); Byte costDivideTarget = parseDivideTarget(productCostOwnership);
if (costDivideTarget == null) { if (costDivideTarget == null) {
...@@ -1805,14 +1813,6 @@ public class StoreApproveServiceImpl implements StoreApproveService { ...@@ -1805,14 +1813,6 @@ public class StoreApproveServiceImpl implements StoreApproveService {
"产品成本", updateBy); "产品成本", updateBy);
} }
String otherTarget = ruleDTO.getOtherFeeSettlementTarget();
Byte otherDivideTarget = parseDivideTarget(otherTarget);
if (otherDivideTarget == null) {
otherDivideTarget = 1;
}
saveDistributionRule(businessCode, baseSceneCode, goodsTypeGroupId, 2,
otherDivideTarget, targetMerchantLevel, FeeCategoryEnum.SETTLE_OTHER_FEE.getValue(), "其他费用", updateBy);
saveDistributionRule(businessCode, baseSceneCode, goodsTypeGroupId, 2, saveDistributionRule(businessCode, baseSceneCode, goodsTypeGroupId, 2,
(byte) 1, targetMerchantLevel, FeeCategoryEnum.HANDLING_FEE.getValue(), "手续费", updateBy); (byte) 1, targetMerchantLevel, FeeCategoryEnum.HANDLING_FEE.getValue(), "手续费", updateBy);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!