|
|
@@ -680,7 +680,7 @@ public class CodexServiceImpl implements CodexService {
|
|
|
}
|
|
|
}
|
|
|
//更新db codexUser
|
|
|
- generateOrUpdateCodexUser(relationUserId, relationId, openaiDailyLimit, openaiQuota, expiryTime, isUpgrade, orderId, skuId, renewExpiryTime, sku.getSpecVal(), userIdList);
|
|
|
+ generateOrUpdateCodexUser(relationUserId, relationId, openaiDailyLimit, openaiQuota, expiryTime, isUpgrade, orderId, skuId, renewExpiryTime, sku.getSpecVal(), userIdList, Boolean.TRUE);
|
|
|
|
|
|
try {
|
|
|
//获取最新的claude code user
|
|
|
@@ -715,7 +715,7 @@ public class CodexServiceImpl implements CodexService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void generateOrUpdateCodexUser(Long relationUserId, Long relationId, Integer openaiDailyLimit, Integer openaiQuota, Date expiryTime, Boolean isUpgrade, Long orderId, Long renewSkuId, Date renewExpiryTime, String planName, List<Long> userIdList) {
|
|
|
+ private void generateOrUpdateCodexUser(Long relationUserId, Long relationId, Integer openaiDailyLimit, Integer openaiQuota, Date expiryTime, Boolean isUpgrade, Long orderId, Long renewSkuId, Date renewExpiryTime, String planName, List<Long> userIdList, Boolean isPay) {
|
|
|
CodexUser codexUser = Optional.ofNullable(codexUserMapper.selectOne(Wrappers.lambdaQuery(CodexUser.class).eq(CodexUser::getRelationId, relationId).last("limit 1"))).orElse(new CodexUser());
|
|
|
if (isUpgrade) {
|
|
|
codexUser.setRenewOrderId(orderId);
|
|
|
@@ -725,6 +725,7 @@ public class CodexServiceImpl implements CodexService {
|
|
|
codexUser.setOpenaiDailyLimit(openaiDailyLimit);
|
|
|
codexUser.setOpenaiQuota(openaiQuota);
|
|
|
}
|
|
|
+ codexUser.setIsPay(isPay);
|
|
|
codexUser.setUserId(relationUserId);
|
|
|
codexUser.setRelationId(relationId);
|
|
|
codexUser.setExpiryTime(expiryTime);
|