use of com.ngtesting.platform.entity.TestVer in project ngtesting-platform by aaronchen2k.
the class VerAction 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);
Long id = json.getLong("id");
TestVer po = verService.delete(id, userVo.getId());
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.entity.TestVer in project ngtesting-platform by aaronchen2k.
the class VerAction method list.
@AuthPassport(validate = true)
@RequestMapping(value = "query", 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 projectId = json.getLong("projectId");
List<TestVer> ls = verService.list(projectId);
List<TestVerVo> vos = verService.genVos(ls);
ret.put("data", vos);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.entity.TestVer in project ngtesting-platform by aaronchen2k.
the class VerServiceImpl method list.
@Override
public List<TestVer> list(Long projectId) {
DetachedCriteria dc = DetachedCriteria.forClass(TestVer.class);
dc.add(Restrictions.eq("deleted", Boolean.FALSE));
dc.add(Restrictions.eq("disabled", Boolean.FALSE));
dc.addOrder(Order.asc("createTime"));
List<TestVer> ls = findAllByCriteria(dc);
return ls;
}
Aggregations