Esempio n. 1
0
 def getApplicationList(self):
     userId = self.get_secure_cookie("userId")
     id=userId
     data=UserService().getUserInfoById(id).getMessage()[0]
     if data["isleader"]==0:
         dataResult=ApplicationService().getApplicationList(userId)
     else:
         dataResult=ApplicationService().getApplicationListLeader()
     return dataResult
Esempio n. 2
0
 def addApplication(self):
     logger.info(self.request.body)
     data = json.loads(self.request.body)
     #数据库该字段可为空,入参没有时,需要补充key,否则访问sql
     if "applicationDescribe" not in data:
         data.setdefault("applicationDescribe",None)
     return ApplicationService().addApplication(data)
 def getCount(self):
     args = {}
     args["createUser"] = UserService().getUserCount().getMessage(
     )[0]["userCount"]
     args["project"] = ProjectService().getProjectCount().getMessage(
     )[0]["projectCount"]
     args["application"] = ApplicationService().getApplicationCount(
     ).getMessage()[0]["applicationCount"]
     args["testCase"] = TestCaseService().getTestCaseCount().getMessage(
     )[0]["testCaseCount"]
     dataResult = DataResult()
     dataResult.setMessage(args)
     dataResult.setSuccess(True)
     logger.info(dataResult)
     return dataResult
Esempio n. 4
0
 def deleteApplication(self):
     data = json.loads(self.request.body)
     return ApplicationService().deleteApplication(data)
Esempio n. 5
0
 def editApplication(self):
     data = json.loads(self.request.body)
     return ApplicationService().editApplication(data)
Esempio n. 6
0
 def getApplicationById(self):
     Id=self.get_argument("id")
     return ApplicationService().getApplicationById(Id)
Esempio n. 7
0
 def getApplicationCountByProject(self):
     projectId = self.get_argument("projectId")
     return ApplicationService().getApplicationCountByProject(projectId)
Esempio n. 8
0
 def getVersionConfig(self):
     projectId = self.get_argument("projectId")
     applicationId = self.get_argument("applicationId")
     return ApplicationService().getVersionConfig(projectId,applicationId)
Esempio n. 9
0
 def editVersionConfig(self):
     data=json.loads(self.request.body)
     return ApplicationService().editVersionConfig(data)
Esempio n. 10
0
 def addApplicationVersion(self):
     logger.info(self.request.body)
     data = json.loads(self.request.body)
     return ApplicationService().addApplicationVersion(data)