use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class RunAction method saveCases.
@AuthPassport(validate = true)
@RequestMapping(value = "saveCases", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> saveCases(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
TestRun po = runService.saveCases(json, userVo);
TestRunVo caseVo = runService.genVo(po);
ret.put("data", caseVo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class RunAction method get.
// @AuthPassport(validate = true)
// @RequestMapping(value = "loadCase", method = RequestMethod.POST)
// @ResponseBody
// public Map<String, Object> loadCase(HttpServletRequest request, @RequestBody JSONObject json) {
// Map<String, Object> ret = new HashMap<String, Object>();
//
// Long orgId = json.getLong("orgId");
// Long projectId = json.getLong("projectId");
// Long runId = json.getLong("runId");
//
// List<TestCaseInRun> ls = runService.lodaCase(runId);
// List<TestCaseInRunVo> vos = runService.genCaseVos(ls);
//
// List<CustomFieldVo> customFieldList = customFieldService.listForCaseByProject(orgId, projectId);
//
// ret.put("data", vos);
// ret.put("customFields", customFieldList);
// ret.put("code", Constant.RespCode.SUCCESS.getCode());
// return ret;
// }
@AuthPassport(validate = true)
@RequestMapping(value = "get", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> get(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
Long runId = json.getLong("id");
TestRunVo vo = runService.getById(runId);
ret.put("data", vo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class SuiteAction method saveCases.
@AuthPassport(validate = true)
@RequestMapping(value = "saveCases", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> saveCases(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
TestSuite po = suiteService.saveCases(json, userVo);
TestSuiteVo runVo = suiteService.genVo(po);
ret.put("data", runVo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class SuiteAction method save.
@AuthPassport(validate = true)
@RequestMapping(value = "save", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> save(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
TestSuite po = suiteService.save(json, userVo);
TestSuiteVo vo = suiteService.genVo(po);
ret.put("data", vo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class CaseCommentsAction method delete.
@AuthPassport(validate = true)
@RequestMapping(value = "delete", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> delete(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
commentsService.delete(json.getLong("id"), userVo.getId());
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
Aggregations