TASK:试用用户机器人余额;

This commit is contained in:
shahaibo
2024-01-30 15:03:38 +08:00
parent 81c5d7ee65
commit f1176dfefb

View File

@@ -337,6 +337,7 @@ public class ChatRobotServiceImpl implements ChatRobotService {
Account account = accountMapper.selectById(userId);
BigDecimal totalCost = BigDecimal.valueOf(5).subtract(chatRobots.get(0).getTotalCost());
if (account.getIsTrial() == 1) {
totalCost = BigDecimal.valueOf(0.1).subtract(chatRobots.get(0).getTotalCost());
return totalCost.divide(BigDecimal.valueOf(0.1), 4, RoundingMode.HALF_UP);
}else {
return totalCost.divide(BigDecimal.valueOf(5), 4, RoundingMode.HALF_UP);