TASK:试用用户机器人余额;
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user