use of com.ngtesting.platform.vo.TestEnvVo in project ngtesting-platform by aaronchen2k.
the class EnvServiceImpl method genVos.
@Override
public List<TestEnvVo> genVos(List<TestEnv> pos) {
List<TestEnvVo> vos = new LinkedList<TestEnvVo>();
for (TestEnv po : pos) {
TestEnvVo vo = genVo(po);
vos.add(vo);
}
return vos;
}
use of com.ngtesting.platform.vo.TestEnvVo in project ngtesting-platform by aaronchen2k.
the class EnvServiceImpl method getById.
@Override
public TestEnvVo getById(Long caseId) {
TestEnv po = (TestEnv) get(TestEnv.class, caseId);
TestEnvVo vo = genVo(po);
return vo;
}
use of com.ngtesting.platform.vo.TestEnvVo in project ngtesting-platform by aaronchen2k.
the class EnvServiceImpl method genVo.
@Override
public TestEnvVo genVo(TestEnv po) {
TestEnvVo vo = new TestEnvVo();
vo.setId(po.getId());
vo.setName(po.getName());
vo.setDescr(po.getDescr());
vo.setProjectId(po.getProjectId());
return vo;
}
use of com.ngtesting.platform.vo.TestEnvVo in project ngtesting-platform by aaronchen2k.
the class EnvAction 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);
TestEnv po = envService.save(json, userVo);
TestEnvVo vo = envService.genVo(po);
optFacade.opt(WsConstant.WS_TODO, userVo.getId().toString());
ret.put("data", vo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.TestEnvVo in project ngtesting-platform by aaronchen2k.
the class EnvAction 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");
TestEnvVo vo = envService.getById(id);
ret.put("data", vo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
Aggregations