mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-30 01:38:43 +08:00 
			
		
		
		
	【增加】系统账户余额不足提示
This commit is contained in:
		| @@ -45,5 +45,6 @@ public interface ErrorCodeConstants { | ||||
|     ErrorCode AI_IMAGE_NOT_EXISTS = new ErrorCode(1_022_005_000, "image 不存在!"); | ||||
|     ErrorCode AI_IMAGE_MIDJOURNEY_SUBMIT_FAIL = new ErrorCode(1_022_005_001, "Midjourney 提交失败! {}"); | ||||
|     ErrorCode AI_IMAGE_CUSTOM_ID_NOT_EXISTS = new ErrorCode(1_022_005_002, "Midjourney 按钮 customId 不存在! {}"); | ||||
|     ErrorCode AI_IMAGE_SYSTEM_ACCOUNT_INSUFFICIENT_BALANCE = new ErrorCode(1_022_005_003, "Midjourney 系统账户余额不足!"); | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -147,6 +147,9 @@ public class AiImageServiceImpl implements AiImageService { | ||||
|  | ||||
|         // 4、保存任务 id (状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)) | ||||
|         if (!MidjourneyApi.SubmitCodeEnum.SUCCESS_CODES.contains(submitResponse.code())) { | ||||
|             if (submitResponse.description().contains("quota_not_enough")) { | ||||
|                 throw exception(AI_IMAGE_SYSTEM_ACCOUNT_INSUFFICIENT_BALANCE, submitResponse.description()); | ||||
|             } | ||||
|             throw exception(AI_IMAGE_MIDJOURNEY_SUBMIT_FAIL, submitResponse.description()); | ||||
|         } | ||||
|         // 4.1、更新 taskId 和参数 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 cherishsince
					cherishsince