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

This commit is contained in:
shahaibo
2024-01-30 15:07:34 +08:00
parent 878b5a129c
commit 5e1573ae09

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);