|
@@ -129,17 +129,6 @@ public class OrderCloseEventHandler implements AwoaraEventHandler<OrderInfoObjec
|
|
|
var platformAmount = (int) (washOrder.getAmount() * 0.1);
|
|
var platformAmount = (int) (washOrder.getAmount() * 0.1);
|
|
|
// 解冻金额
|
|
// 解冻金额
|
|
|
var unfreezeAmount = (int) (washOrder.getAmount() * 0.3);
|
|
var unfreezeAmount = (int) (washOrder.getAmount() * 0.3);
|
|
|
- stationAccountService.lambdaUpdate()
|
|
|
|
|
- .setSql("balance = balance + {0}, frozen_amount = frozen_amount - {1}", unfreezeAmount - platformAmount, unfreezeAmount)
|
|
|
|
|
- .eq(StationAccount::getStationId, washOrder.getStationId())
|
|
|
|
|
- .update();
|
|
|
|
|
-
|
|
|
|
|
- // 平台技术服务费10%
|
|
|
|
|
- stationAccountService.lambdaUpdate()
|
|
|
|
|
- .setSql("balance = balance + {0}", platformAmount)
|
|
|
|
|
- .eq(StationAccount::getId, StationAccount.PLATFORM_ACCOUNT_ID)
|
|
|
|
|
- .eq(StationAccount::getStationId, StationAccount.PLATFORM_STATION_ID)
|
|
|
|
|
- .update();
|
|
|
|
|
|
|
|
|
|
// 技术服务费
|
|
// 技术服务费
|
|
|
var splitRecord0 = new SplitRecord()
|
|
var splitRecord0 = new SplitRecord()
|
|
@@ -191,6 +180,20 @@ public class OrderCloseEventHandler implements AwoaraEventHandler<OrderInfoObjec
|
|
|
|
|
|
|
|
stationAccountRecordService.saveBatch(List.of(stationAccountRecord0, stationAccountRecord1));
|
|
stationAccountRecordService.saveBatch(List.of(stationAccountRecord0, stationAccountRecord1));
|
|
|
|
|
|
|
|
|
|
+ // 最后更新账户金额
|
|
|
|
|
+ stationAccountService.lambdaUpdate()
|
|
|
|
|
+ .setSql("balance = balance + {0}, frozen_amount = frozen_amount - {1}", unfreezeAmount - platformAmount, unfreezeAmount)
|
|
|
|
|
+ .eq(StationAccount::getStationId, washOrder.getStationId())
|
|
|
|
|
+ .update();
|
|
|
|
|
+
|
|
|
|
|
+ // 平台技术服务费10%
|
|
|
|
|
+ stationAccountService.lambdaUpdate()
|
|
|
|
|
+ .setSql("balance = balance + {0}", platformAmount)
|
|
|
|
|
+ .eq(StationAccount::getId, StationAccount.PLATFORM_ACCOUNT_ID)
|
|
|
|
|
+ .eq(StationAccount::getStationId, StationAccount.PLATFORM_STATION_ID)
|
|
|
|
|
+ .update();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|