Search in sources :

Example 6 with CaseExeStatusVo

use of com.ngtesting.platform.vo.CaseExeStatusVo in project ngtesting-platform by aaronchen2k.

the class CaseExeStatusAction 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();
    CaseExeStatusVo vo = json.getObject("model", CaseExeStatusVo.class);
    TestCaseExeStatus po = caseExeStatusService.save(vo, orgId);
    CaseExeStatusVo projectVo = caseExeStatusService.genVo(po);
    ret.put("data", projectVo);
    ret.put("code", Constant.RespCode.SUCCESS.getCode());
    return ret;
}
Also used : CaseExeStatusVo(com.ngtesting.platform.vo.CaseExeStatusVo) TestCaseExeStatus(com.ngtesting.platform.entity.TestCaseExeStatus) UserVo(com.ngtesting.platform.vo.UserVo) HashMap(java.util.HashMap) JSONObject(com.alibaba.fastjson.JSONObject) AuthPassport(com.ngtesting.platform.util.AuthPassport) RequestMapping(org.springframework.web.bind.annotation.RequestMapping) ResponseBody(org.springframework.web.bind.annotation.ResponseBody)

Example 7 with CaseExeStatusVo

use of com.ngtesting.platform.vo.CaseExeStatusVo in project ngtesting-platform by aaronchen2k.

the class CaseExeStatusServiceImpl method listVos.

@Override
public List<CaseExeStatusVo> listVos(Long orgId) {
    List ls = list(orgId);
    List<CaseExeStatusVo> vos = genVos(ls);
    return vos;
}
Also used : CaseExeStatusVo(com.ngtesting.platform.vo.CaseExeStatusVo) List(java.util.List) LinkedList(java.util.LinkedList)

Aggregations

CaseExeStatusVo (com.ngtesting.platform.vo.CaseExeStatusVo)7 JSONObject (com.alibaba.fastjson.JSONObject)4 AuthPassport (com.ngtesting.platform.util.AuthPassport)4 UserVo (com.ngtesting.platform.vo.UserVo)4 HashMap (java.util.HashMap)4 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)4 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)4 TestCaseExeStatus (com.ngtesting.platform.entity.TestCaseExeStatus)3 LinkedList (java.util.LinkedList)2 List (java.util.List)1