|
|
@@ -634,7 +634,7 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
|
|
|
UpgradePackage upgradePackage = upgradePackageMapper.selectById(chatgptUser.getPackageId());
|
|
|
packagePrice = upgradePackage.getPrice();
|
|
|
}
|
|
|
-// JSONObject conversationCount = getConversationCount(chatgptUser.getUserToken());
|
|
|
+ JSONObject conversationCount = getConversationCount(chatgptUser.getUserToken());
|
|
|
|
|
|
ChatGptUserView view = ChatGptUserView.builder()
|
|
|
.skuName(goodsDonSku.getSubTitle())
|
|
|
@@ -651,7 +651,7 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
|
|
|
.goodsId(goodsDonSku.getGoodsId())
|
|
|
.skuId(goodsDonSku.getId())
|
|
|
.months(goodsDonSku.getMonths())
|
|
|
-// .use(Math.min(chatgptUser.getLimitNum(), Optional.ofNullable(conversationCount.getLong("count")).orElse(0L)))
|
|
|
+ .use(Math.min(chatgptUser.getLimitNum(), Optional.ofNullable(conversationCount.getLong("count")).orElse(0L)))
|
|
|
.packageId(chatgptUser.getPackageId())
|
|
|
.packagePrice(packagePrice)
|
|
|
.isRenewPackage(chatgptUser.getRenewOrderId() != null ? true : false)
|
|
|
@@ -663,8 +663,8 @@ public class ChatGptAccountServiceImpl implements ChatGptAccountService {
|
|
|
if (view.getRenewSkuId() != null) {
|
|
|
Optional.ofNullable(skuMapper.selectById(view.getRenewSkuId())).ifPresent(renewSuu -> view.setRenewSpecVal(renewSuu.getSpecVal()));
|
|
|
}
|
|
|
-// view.setOtherUse(Optional.ofNullable(conversationCount.getLong("other")).orElse(0L));
|
|
|
-// view.setDpsUse(Optional.ofNullable(conversationCount.getLong("dps")).orElse(0L));
|
|
|
+ view.setOtherUse(Optional.ofNullable(conversationCount.getLong("other")).orElse(0L));
|
|
|
+ view.setDpsUse(Optional.ofNullable(conversationCount.getLong("dps")).orElse(0L));
|
|
|
return view;
|
|
|
} else {
|
|
|
throw BusinessRuntimeException.getInstance("您还未购买该车票");
|