更改分润通知小数点位数
This commit is contained in:
@@ -73,6 +73,9 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
|
||||
//解决通知分润带有科学计数法
|
||||
amt = profitMoney.stripTrailingZeros().toPlainString();
|
||||
Notice notice = new Notice(0, 6, userApp);
|
||||
|
||||
amt = String.format("%.2f", amt);
|
||||
|
||||
notice.setConrtent("您有一笔" + amt + "元的推广分润");
|
||||
notice.setUniqueKey(userApp.getUserId() + orderNumber + "profit");
|
||||
noticeService.saveNotice(notice);
|
||||
@@ -95,11 +98,13 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
|
||||
log.debug(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分润创建2.0模式
|
||||
* @date: 2022/1/21 15:16
|
||||
*
|
||||
* @param order:
|
||||
* @param type:
|
||||
* @date: 2022/1/21 15:16
|
||||
*/
|
||||
@Override
|
||||
public void createOrderProfitV2(MerchantOrder order, String type) {
|
||||
@@ -116,12 +121,13 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
|
||||
}
|
||||
calcUserProfitV2(userApp, order, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算分润开始
|
||||
* @date: 2022/1/21 15:29
|
||||
*
|
||||
* @param userApp:
|
||||
* @param orderType:
|
||||
* @date: 2022/1/21 15:29
|
||||
*/
|
||||
private void calcUserProfitV2(UserApp userApp, MerchantOrder order, String orderType) {
|
||||
//2.0
|
||||
@@ -152,11 +158,13 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
|
||||
log.info("【分润结算结束】订单号:{}产生的分润总额:{}", order.getOrderNumber(), sumProfitMoney);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建2.0分润
|
||||
* @date: 2022/1/21 15:48
|
||||
*
|
||||
* @param nowUserApp:
|
||||
* @param order:
|
||||
* @date: 2022/1/21 15:48
|
||||
*/
|
||||
private void createUserSV2Profit(UserApp userApp, MerchantOrder order, BigDecimal nowRate,
|
||||
UserApp nowUserApp, Vector<MerchantProfit> profitList, Integer type, String orderType) {
|
||||
@@ -203,11 +211,13 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
|
||||
}
|
||||
createUserSV2Profit(pUserApp, order, nowRate, nowUserApp, profitList, type, orderType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建直营倍斯特分润
|
||||
* @date: 2022/1/21 15:48
|
||||
*
|
||||
* @param userApp:
|
||||
* @param order:
|
||||
* @date: 2022/1/21 15:48
|
||||
*/
|
||||
private void createUserBstProfit(UserApp userApp, UserApp nowUserApp, MerchantOrder order, Vector<MerchantProfit> profitList,
|
||||
Integer type, BigDecimal useRate, String orderType) {
|
||||
|
||||
Reference in New Issue
Block a user