Compare commits

...

2 Commits

4 changed files with 14 additions and 4 deletions

View File

@ -100,6 +100,7 @@ import { constantRoutes } from '@/router/index.js'
import Login from './Login.vue' import Login from './Login.vue'
import { LOCALE_NAMES } from '@/lang/i18n' import { LOCALE_NAMES } from '@/lang/i18n'
import User from './User.vue' import User from './User.vue'
import { getToken } from '@/utils/auth'
export default { export default {
name: 'nav-bar', name: 'nav-bar',
@ -182,6 +183,9 @@ export default {
this.openLogin() this.openLogin()
} }
this.getLogo() this.getLogo()
if (getToken()) {
this.$store.dispatch('user/getInfo').catch(() => {})
}
}, },
methods: { methods: {
openLogin() { openLogin() {

View File

@ -1150,6 +1150,7 @@ export default {
this.videoId = res.data.id this.videoId = res.data.id
this.showResult = true this.showResult = true
this.$refs.videoComposeRef?.clearPromptOnly?.() this.$refs.videoComposeRef?.clearPromptOnly?.()
this.$store.dispatch('user/getInfo').catch(() => {})
this.getVideo(res.data.id) this.getVideo(res.data.id)
this.refreshChatFirstPage() this.refreshChatFirstPage()
} else if (res.code == -1) { } else if (res.code == -1) {

View File

@ -194,6 +194,7 @@ public class PortalVideoController extends BaseController {
aiOrder.setMode(mode); aiOrder.setMode(mode);
aiOrder.setIsBackfilled(0); aiOrder.setIsBackfilled(0);
applyOrderImages(aiOrder, req); applyOrderImages(aiOrder, req);
aiOrder.setExtStatus(0);
if (req.getDuration() != null) { if (req.getDuration() != null) {
aiOrder.setDuration(req.getDuration()); aiOrder.setDuration(req.getDuration());
} else if (body.getDuration() != null) { } else if (body.getDuration() != null) {

View File

@ -58,8 +58,11 @@ public class AiOrderServiceImpl implements IAiOrderService {
@Autowired @Autowired
private IAiStatisticsService aiStatisticsService; 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.setType(aiType);
aiOrder.setResult(null); aiOrder.setResult(null);
if (isReduceBalance) { if (isReduceBalance) {
aiOrder.setPreDeductAmount(aiManager.getPrice());
aiOrder.setAmount(aiManager.getPrice()); aiOrder.setAmount(aiManager.getPrice());
} else { } else {
// 不按aimanager扣减的等提交任务再按实扣减 // 不按aimanager扣减的等提交任务再按实扣减
@ -194,7 +198,7 @@ public class AiOrderServiceImpl implements IAiOrderService {
// 执行余额变更 // 执行余额变更
if (isReduceBalance) { if (isReduceBalance) {
aiUserService.addUserBalance(orderno, SecurityUtils.getAiUserId() aiUserService.addUserBalance(orderno, SecurityUtils.getAiUserId()
, NumberUtil.mul(-1, aiManager.getPrice()), getChangerType(aiType)); , NumberUtil.mul(-1, aiManager.getPrice()), getChangerType(aiType), TASK_SUBMIT_REMARK);
} }
return aiOrder; return aiOrder;
} }
@ -322,7 +326,7 @@ public class AiOrderServiceImpl implements IAiOrderService {
if (addAmount.compareTo(new BigDecimal(0)) != 0) { if (addAmount.compareTo(new BigDecimal(0)) != 0) {
// 回补 // 回补
aiUserService.addUserBalance(order.getOrderNum(), order.getUserId(), addAmount, aiUserService.addUserBalance(order.getOrderNum(), order.getUserId(), addAmount,
BalanceChangerConstants.REFUND, TASK_SUCCESS_BALANCE_REMARK); BalanceChangerConstants.REFUND, TASK_SUCCESS_BACK_FILL_REMARK);
} }
} }