use of com.ngtesting.platform.vo.CasePriorityVo in project ngtesting-platform by aaronchen2k.
the class CasePriorityServiceImpl method genVos.
@Override
public List<CasePriorityVo> genVos(List<TestCasePriority> pos) {
List<CasePriorityVo> vos = new LinkedList<CasePriorityVo>();
for (TestCasePriority po : pos) {
CasePriorityVo vo = genVo(po);
vos.add(vo);
}
return vos;
}
use of com.ngtesting.platform.vo.CasePriorityVo in project ngtesting-platform by aaronchen2k.
the class CasePriorityAction method setDefault.
@AuthPassport(validate = true)
@RequestMapping(value = "setDefault", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> setDefault(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");
boolean success = casePriorityService.setDefaultPers(id, 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.CasePriorityVo in project ngtesting-platform by aaronchen2k.
the class CasePriorityAction 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);
Long orgId = userVo.getDefaultOrgId();
CasePriorityVo vo = json.getObject("model", CasePriorityVo.class);
TestCasePriority po = casePriorityService.save(vo, orgId);
CasePriorityVo projectVo = casePriorityService.genVo(po);
Map<String, Map<String, String>> casePropertyMap = casePropertyService.getMap(orgId);
ret.put("casePropertyMap", casePropertyMap);
ret.put("data", projectVo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.CasePriorityVo 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.CasePriorityVo 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;
}
Aggregations