feat: 生成视频时产生的流水都加上备注
This commit is contained in:
parent
dda43f2de6
commit
7068fad278
|
|
@ -194,6 +194,7 @@ public class PortalVideoController extends BaseController {
|
|||
aiOrder.setMode(mode);
|
||||
aiOrder.setIsBackfilled(0);
|
||||
applyOrderImages(aiOrder, req);
|
||||
aiOrder.setExtStatus(0);
|
||||
if (req.getDuration() != null) {
|
||||
aiOrder.setDuration(req.getDuration());
|
||||
} else if (body.getDuration() != null) {
|
||||
|
|
|
|||
|
|
@ -58,8 +58,11 @@ public class AiOrderServiceImpl implements IAiOrderService {
|
|||
@Autowired
|
||||
private IAiStatisticsService aiStatisticsService;
|
||||
|
||||
// 任务成功时流水表备注
|
||||
private static final String TASK_SUCCESS_BALANCE_REMARK = "order.number.generation.successes";
|
||||
// 流水表:任务成功时回补
|
||||
private static final String TASK_SUCCESS_BACK_FILL_REMARK = "order.number.generation.successbackfill";
|
||||
|
||||
// 流水表:提交任务时预扣
|
||||
private static final String TASK_SUBMIT_REMARK = "order.number.generation.submit";
|
||||
|
||||
/**
|
||||
* 查询订单管理
|
||||
|
|
@ -183,6 +186,7 @@ public class AiOrderServiceImpl implements IAiOrderService {
|
|||
aiOrder.setType(aiType);
|
||||
aiOrder.setResult(null);
|
||||
if (isReduceBalance) {
|
||||
aiOrder.setPreDeductAmount(aiManager.getPrice());
|
||||
aiOrder.setAmount(aiManager.getPrice());
|
||||
} else {
|
||||
// 不按aimanager扣减的,等提交任务再按实扣减
|
||||
|
|
@ -194,7 +198,7 @@ public class AiOrderServiceImpl implements IAiOrderService {
|
|||
// 执行余额变更
|
||||
if (isReduceBalance) {
|
||||
aiUserService.addUserBalance(orderno, SecurityUtils.getAiUserId()
|
||||
, NumberUtil.mul(-1, aiManager.getPrice()), getChangerType(aiType));
|
||||
, NumberUtil.mul(-1, aiManager.getPrice()), getChangerType(aiType), TASK_SUBMIT_REMARK);
|
||||
}
|
||||
return aiOrder;
|
||||
}
|
||||
|
|
@ -322,7 +326,7 @@ public class AiOrderServiceImpl implements IAiOrderService {
|
|||
if (addAmount.compareTo(new BigDecimal(0)) != 0) {
|
||||
// 回补
|
||||
aiUserService.addUserBalance(order.getOrderNum(), order.getUserId(), addAmount,
|
||||
BalanceChangerConstants.REFUND, TASK_SUCCESS_BALANCE_REMARK);
|
||||
BalanceChangerConstants.REFUND, TASK_SUCCESS_BACK_FILL_REMARK);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue