use of com.ngtesting.platform.entity.TestCase in project ngtesting-platform by aaronchen2k.
the class CaseAction method rename.
@AuthPassport(validate = true)
@RequestMapping(value = "rename", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> rename(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
TestCase testCasePo = caseService.renamePers(json, userVo);
caseService.updateParentIfNeededPers(testCasePo.getpId());
TestCaseVo caseVo = caseService.genVo(testCasePo);
ret.put("data", caseVo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
Aggregations