use of com.ngtesting.platform.vo.CaseExeStatusVo in project ngtesting-platform by aaronchen2k.
the class CaseExeStatusServiceImpl method genVo.
// @Override
// public void createDefaultBasicDataPers(Long orgId) {
// DetachedCriteria dc = DetachedCriteria.forClass(TestCaseExeStatus.class);
// dc.add(Restrictions.eq("isBuildIn", true));
// dc.add(Restrictions.eq("disabled", Boolean.FALSE));
// dc.add(Restrictions.eq("deleted", Boolean.FALSE));
//
// dc.addOrder(Order.asc("displayOrder"));
// List<TestCaseExeStatus> ls = findAllByCriteria(dc);
//
// for (TestCaseExeStatus p : ls) {
// TestCaseExeStatus temp = new TestCaseExeStatus();
// BeanUtilEx.copyProperties(temp, p);
// temp.setId(null);
// temp.setOrgId(orgId);
// temp.setBuildIn(false);
// saveOrUpdate(temp);
// }
// }
@Override
public CaseExeStatusVo genVo(TestCaseExeStatus po) {
if (po == null) {
return null;
}
CaseExeStatusVo vo = new CaseExeStatusVo();
BeanUtilEx.copyProperties(vo, po);
return vo;
}
use of com.ngtesting.platform.vo.CaseExeStatusVo in project ngtesting-platform by aaronchen2k.
the class CaseExeStatusServiceImpl method genVos.
@Override
public List<CaseExeStatusVo> genVos(List<TestCaseExeStatus> pos) {
List<CaseExeStatusVo> vos = new LinkedList<CaseExeStatusVo>();
for (TestCaseExeStatus po : pos) {
CaseExeStatusVo vo = genVo(po);
vos.add(vo);
}
return vos;
}
use of com.ngtesting.platform.vo.CaseExeStatusVo in project ngtesting-platform by aaronchen2k.
the class CaseExeStatusAction 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 CaseExeStatusVo());
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
TestCaseExeStatus po = (TestCaseExeStatus) caseExeStatusService.get(TestCaseExeStatus.class, id);
CaseExeStatusVo vo = caseExeStatusService.genVo(po);
ret.put("data", vo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.CaseExeStatusVo in project ngtesting-platform by aaronchen2k.
the class CaseExeStatusAction 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<CaseExeStatusVo> vos = caseExeStatusService.listVos(orgId);
ret.put("data", vos);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.CaseExeStatusVo in project ngtesting-platform by aaronchen2k.
the class CaseExeStatusAction 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 = caseExeStatusService.changeOrderPers(id, act);
List<CaseExeStatusVo> vos = caseExeStatusService.listVos(orgId);
ret.put("data", vos);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
Aggregations