use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class CasePriorityAction method changeOrder.
@AuthPassport(validate = true)
@RequestMapping(value = "changeOrder", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> changeOrder(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 orgId = userVo.getDefaultOrgId();
Long id = json.getLong("id");
String act = json.getString("act");
boolean success = casePriorityService.changeOrderPers(id, act, orgId);
List<CasePriorityVo> vos = casePriorityService.listVos(orgId);
ret.put("data", vos);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class CasePriorityAction method list.
@AuthPassport(validate = true)
@RequestMapping(value = "list", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> list(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 orgId = userVo.getDefaultOrgId();
List<CasePriorityVo> vos = casePriorityService.listVos(orgId);
ret.put("data", vos);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class CasePriorityAction method get.
@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 id = json.getLong("id");
if (id == null) {
ret.put("data", new CasePriorityVo());
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
TestCasePriority po = (TestCasePriority) casePriorityService.get(TestCasePriority.class, id);
CasePriorityVo vo = casePriorityService.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 CaseStepAction method up.
@AuthPassport(validate = true)
@RequestMapping(value = "up", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> up(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
TestCaseStep po = caseStepService.changeOrderPers(json, "up", userVo.getId());
TestCaseStepVo stepVo = caseStepService.genVo(po);
ret.put("data", stepVo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class CaseStepAction method down.
@AuthPassport(validate = true)
@RequestMapping(value = "down", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> down(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
TestCaseStep po = caseStepService.changeOrderPers(json, "down", userVo.getId());
TestCaseStepVo stepVo = caseStepService.genVo(po);
ret.put("data", stepVo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
Aggregations