|
|
@@ -75,10 +75,12 @@ public class ClaudeCodexApiServiceImpl implements ClaudeCodexApiService {
|
|
|
public ClaudeCodeResp createOrUpdateCodexUserPackageApi(Long userId, String planName, Integer openaiDailyLimit, Integer openaiPermanentBalance, Date expiryTime) throws Exception {
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
params.put("plan_name", planName.replaceAll(";", ""));
|
|
|
- params.put("openai_daily_limit", openaiDailyLimit);
|
|
|
+ if (openaiDailyLimit != null) {
|
|
|
+ params.put("openai_daily_limit", openaiDailyLimit);
|
|
|
+ }
|
|
|
params.put("openai_quota", openaiPermanentBalance);
|
|
|
params.put("expire_time", DateUtil.format(expiryTime, "yyyy-MM-dd HH:mm:ss"));
|
|
|
- //claude 类型
|
|
|
+ //codex 类型
|
|
|
params.put("service_type", "openai");
|
|
|
|
|
|
String planUrl = String.format(Constant.CLAUDE_CODE_API_PREFIX + "api/users/%s/plan", userId);
|