From c72969a8be90910fb456d40234da68a4ec12a763 Mon Sep 17 00:00:00 2001 From: danial Date: Fri, 23 Aug 2024 09:15:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=A5=E9=99=90?= =?UTF-8?q?=E9=A2=9D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + deploy/Dockerfile | 2 +- src/integrations/itunes/api.py | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7f0d1ea --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +### iTunes登录脚本 \ No newline at end of file diff --git a/deploy/Dockerfile b/deploy/Dockerfile index cfb7144..cac9848 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.11-slim +FROM python:3.12-slim COPY . /app WORKDIR /app diff --git a/src/integrations/itunes/api.py b/src/integrations/itunes/api.py index 57ae132..d68c058 100644 --- a/src/integrations/itunes/api.py +++ b/src/integrations/itunes/api.py @@ -231,10 +231,16 @@ class AppleClient: result.errorMessageKey == "MZCommerce.GiftCertificateAlreadyRedeemed" ): + # 已经被兑换 result.status = 12 elif result.errorMessageKey == "MZFreeProductCode.NoSuch": + # 没有这个卡密 result.status = 11 elif result.errorMessageKey == "MZCommerce.NatIdYearlyCapExceededException": + # 年限额 + result.status = 31 + elif result.errorMessageKey == "MZCommerce.NatIdDailyCapExceededException": + # 日限额 result.status = 31 else: logger.error(f"失败状态未知:{response.json()}")