From e0599585beaef25a25dd03898bd88824816c800a Mon Sep 17 00:00:00 2001 From: isummer Date: Sat, 12 Nov 2022 07:30:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=89=8D=E7=AB=AF=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E8=B6=85=E7=BA=A7=E7=AD=BE=E5=90=8D=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/api/utils/serializer.py | 14 +++++--------- fir_ser/cli.py | 10 ++++++---- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/fir_ser/api/utils/serializer.py b/fir_ser/api/utils/serializer.py index 2c18047..7b36079 100644 --- a/fir_ser/api/utils/serializer.py +++ b/fir_ser/api/utils/serializer.py @@ -166,15 +166,11 @@ class AppsSerializer(serializers.ModelSerializer): def get_sign_type_choice(self, obj): return get_choices_dict(obj.supersign_type_choices) - # supersign_used_number = serializers.IntegerField(default=0) - # - # def get_supersign_used_number(self, obj): - # return models.APPSuperSignUsedInfo.objects.filter(app_id=obj).all().count() - # - # developer_used_count = serializers.IntegerField(default=0) - # - # def get_developer_used_count(self, obj): - # return models.DeveloperAppID.objects.filter(app_id=obj).all().count() + count = serializers.IntegerField(default=0) + developer_used_count = serializers.IntegerField(default=0) + private_developer_number = serializers.IntegerField(default=0) + private_developer_used_number = serializers.IntegerField(default=0) + supersign_used_number = serializers.IntegerField(default=0) screenshots = serializers.SerializerMethodField() diff --git a/fir_ser/cli.py b/fir_ser/cli.py index 232d411..e0a9adf 100644 --- a/fir_ser/cli.py +++ b/fir_ser/cli.py @@ -112,9 +112,11 @@ class FLYCliSer(object): req = requests.put(url, json=data, headers=self._header) if req.status_code == 200: if req.json()['code'] == 1000: - print("应用 %s %s 上传更新成功,下载连接 %s" % ( - data.get('appname'), data.get('bundleid'), req.json()['data'].get('preview_url'))) - return + master_download_url = req.json().get('data', {}).get('preview_url') + print("应用 %s %s 上传更新成功" % (data.get('appname'), data.get('bundleid'))) + print("当前应用下载连接:", master_download_url) + print("当前版本下载连接:", master_download_url + '?release_id=' + data.get('upload_key').split('.')[0]) + return master_download_url raise AssertionError(req.text) def upload_local_storage(self, upload_key, upload_token, app_id, file_path): @@ -201,7 +203,7 @@ class FLYCliSer(object): "udid": appinfo.get('udid', []), "type": appinfo['type'], } - self.analyse({**app_data, **upcretsdata}) + return self.analyse({**app_data, **upcretsdata}) class AppInfo(object):