Commit cfdb88f0 authored by shiyu's avatar shiyu

平台佣金改为3%

parent ee7f9f5c
......@@ -84,18 +84,18 @@ public class DistributorProfitServiceImpl implements DistributorProfitService {
public Result getExpectAmount(SupplierItemRequestDto supplierItemRequestDto) {
try {
Map<String, String> map = new HashMap<>();
map.put("introduceRebate", "3%");
double channelServiceRebate = 0.15;
map.put("introduceRebate", "2%");
double channelServiceRebate = 0.03;
CollectorWhiteList collectorWhiteList = collectorWhiteListDao.findById(supplierItemRequestDto.getUserId());
if (collectorWhiteList != null) {
channelServiceRebate = PriceUtil.convertToDivide(collectorWhiteList.getChannelCostRebate()).doubleValue();
map.put("channelServiceRebate", collectorWhiteList.getChannelCostRebate().intValue() + "%");
} else {
map.put("channelServiceRebate", "15%");
map.put("channelServiceRebate", "3%");
}
Long itemPrice = PriceUtil.convertPriceFromStr(supplierItemRequestDto.getDistributionPrice());
long channelServiceCost = PriceUtil.convertPriceFromStr(PriceUtil.convertDoubleToString(itemPrice.doubleValue() * channelServiceRebate));
long introduceCost = PriceUtil.convertPriceFromStr(PriceUtil.convertDoubleToString(itemPrice.doubleValue() * 0.03));
long introduceCost = PriceUtil.convertPriceFromStr(PriceUtil.convertDoubleToString(itemPrice.doubleValue() * 0.02));
long profit = itemPrice - channelServiceCost - introduceCost;
map.put("channelServiceCost", PriceUtil.convertPriceFenToYuan(channelServiceCost));
map.put("introduceCost", PriceUtil.convertPriceFenToYuan(introduceCost));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment