Exemple #1
0
 def upate_app_complete_by_app_id(self, app_id, data):
     app = share_repo.get_app_by_app_id(app_id=app_id)
     is_complete = False
     if app.scope == 'goodrain':
         app.scope = data["GRYS"]
         is_complete = True
     elif app.scope == 'team' or app.scope == 'enterprise':
         app.scope = data["GRYB"]
         is_complete = True
     app.is_complete = is_complete
     app.save()
 def get_app_by_app_id(self, app_id):
     app = share_repo.get_app_by_app_id(app_id=app_id)
     if app:
         return 200, "应用包获取成功", app[0]
     else:
         return 400, '应用包不存在', None