|
|
@@ -460,12 +460,15 @@ public class LawyerConsultationOrderServiceImpl extends ServiceImpl<LawyerConsul
|
|
|
order.setOrderNumber(orderNumber);
|
|
|
log.info("生成订单编号:orderNumber={}", orderNumber);
|
|
|
|
|
|
- // 计算本单收益(咨询费用)
|
|
|
+ // 计算本单收益(平台收益)
|
|
|
Integer consultationFee = calculateConsultationFee(lawyerUserId, orderAmount);
|
|
|
order.setConsultationFee(consultationFee);
|
|
|
log.info("计算咨询费用:lawyerUserId={}, orderAmount={}, consultationFee={}",
|
|
|
lawyerUserId, orderAmount, consultationFee);
|
|
|
|
|
|
+ // 计算律师收益(订单金额-平台收益)
|
|
|
+ Integer lawyerEarnings = orderAmount - consultationFee;
|
|
|
+ order.setLawyerEarnings(lawyerEarnings);
|
|
|
// 插入订单
|
|
|
int insertCount = consultationOrderMapper.insertOrder(order);
|
|
|
if (insertCount > 0) {
|