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):