|
@@ -2,6 +2,7 @@ package com.chelvc.cloud.vehicle.server.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.chelvc.cloud.vehicle.api.constant.PlatformConstant;
|
|
|
import com.chelvc.cloud.vehicle.api.service.UserInviteService;
|
|
|
import com.chelvc.cloud.vehicle.server.dao.OmsOrderMapper;
|
|
|
import com.chelvc.cloud.vehicle.server.entity.OmsOrder;
|
|
@@ -146,19 +147,19 @@ public class OderHandleServiceImpl implements OrderHandleService {
|
|
|
//更新平台资产
|
|
|
assetService.updatePlatformAsset(platformRealityAmount, payAmount);
|
|
|
//平台流水
|
|
|
- currencyRecordService.recordFlow(1L, 0, 0, orderId, userId, 3, platformAmount, deduct, platformRealityAmount);
|
|
|
+ currencyRecordService.recordFlow(PlatformConstant.PLATFORM_ID, 0, 0, orderId, userId, 3, platformAmount, deduct, platformRealityAmount);
|
|
|
|
|
|
omsOrderOperateHistoryService.insertOmsOrderOperateHistory(omsOrder.getId(), userId, omsOrder.getStatus());
|
|
|
- /*BigDecimal platformSurplusAmount = assetService.updateAsset(1, operateAmount, 1L, 0);
|
|
|
- balanceDetailService.recordFlow(omsOrder.getId(), 0, 1L, operateAmount, platformSurplusAmount, 1, 1,
|
|
|
+ /*BigDecimal platformSurplusAmount = assetService.updateAsset(1, operateAmount, 0L, 0);
|
|
|
+ balanceDetailService.recordFlow(omsOrder.getId(), 0, 0L, operateAmount, platformSurplusAmount, 1, 1,
|
|
|
merchantId);
|
|
|
//邀请用户---分得佣金
|
|
|
if (userAmount.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
BigDecimal userSurplusAmount = assetService.updateAsset(0, userAmount, inviteUserId, 1);
|
|
|
balanceDetailService.recordFlow(omsOrder.getId(), 1, inviteUserId, userAmount, userSurplusAmount, 0, 1,
|
|
|
userId);
|
|
|
- BigDecimal platformSurplusAmount1 = assetService.updateAsset(1, userAmount, 1L, 0);
|
|
|
- balanceDetailService.recordFlow(omsOrder.getId(), 0, 1L, userAmount, platformSurplusAmount1, 1, 1,
|
|
|
+ BigDecimal platformSurplusAmount1 = assetService.updateAsset(1, userAmount, 0L, 0);
|
|
|
+ balanceDetailService.recordFlow(omsOrder.getId(), 0, 0L, userAmount, platformSurplusAmount1, 1, 1,
|
|
|
inviteUserId);
|
|
|
}
|
|
|
//邀请商家---分得佣金
|
|
@@ -166,8 +167,8 @@ public class OderHandleServiceImpl implements OrderHandleService {
|
|
|
BigDecimal merchantSurplusAmount2 = assetService.updateAsset(0, merchantAmount, inviteMerchantId, 1);
|
|
|
balanceDetailService.recordFlow(omsOrder.getId(), 1, inviteMerchantId, merchantAmount,
|
|
|
merchantSurplusAmount2, 0, 1, merchantId);
|
|
|
- BigDecimal platformSurplusAmount2 = assetService.updateAsset(1, merchantAmount, 1L, 0);
|
|
|
- balanceDetailService.recordFlow(omsOrder.getId(), 0, 1L, merchantAmount, platformSurplusAmount2, 1, 1,
|
|
|
+ BigDecimal platformSurplusAmount2 = assetService.updateAsset(1, merchantAmount, 0L, 0);
|
|
|
+ balanceDetailService.recordFlow(omsOrder.getId(), 0, 0L, merchantAmount, platformSurplusAmount2, 1, 1,
|
|
|
inviteMerchantId);
|
|
|
}*/
|
|
|
}
|
|
@@ -175,10 +176,10 @@ public class OderHandleServiceImpl implements OrderHandleService {
|
|
|
@Override
|
|
|
public void paySuccess(OmsOrder order) {
|
|
|
omsOrderMapper.updateById(order);
|
|
|
- assetService.updateAsset(0, order.getPayAmount(), 1L, 0, 2);
|
|
|
+ assetService.updateAsset(0, order.getPayAmount(), PlatformConstant.PLATFORM_ID, 0, 2);
|
|
|
omsOrderOperateHistoryService.insertOmsOrderOperateHistory(order.getId(), order.getUserId(), order.getStatus());
|
|
|
- /* BigDecimal surplusAmount = assetService.updateAsset(0, order.getPayAmount(), 1L, 0);
|
|
|
- balanceDetailService.recordFlow(order.getId(), 0, 1L, order.getPayAmount(), surplusAmount, 0, 1,
|
|
|
+ /* BigDecimal surplusAmount = assetService.updateAsset(0, order.getPayAmount(), 0L, 0);
|
|
|
+ balanceDetailService.recordFlow(order.getId(), 0, 0L, order.getPayAmount(), surplusAmount, 0, 1,
|
|
|
order.getUserId());*/
|
|
|
}
|
|
|
|