use of com.ngtesting.platform.vo.CasePriorityVo 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.CasePriorityVo in project ngtesting-platform by aaronchen2k.
the class CasePriorityServiceImpl method genVo.
@Override
public CasePriorityVo genVo(TestCasePriority po) {
if (po == null) {
return null;
}
CasePriorityVo vo = new CasePriorityVo();
BeanUtilEx.copyProperties(vo, po);
return vo;
}
use of com.ngtesting.platform.vo.CasePriorityVo in project ngtesting-platform by aaronchen2k.
the class CasePriorityServiceImpl method listVos.
@Override
public List<CasePriorityVo> listVos(Long orgId) {
List ls = list(orgId);
List<CasePriorityVo> vos = genVos(ls);
return vos;
}
Aggregations