use of com.ngtesting.platform.vo.OrgGroupVo in project ngtesting-platform by aaronchen2k.
the class OrgGroupAction 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();
OrgGroupVo group = JSON.parseObject(JSON.toJSONString(json.get("group")), OrgGroupVo.class);
;
List<RelationOrgGroupUserVo> relations = (List<RelationOrgGroupUserVo>) json.get("relations");
TestOrgGroup po = orgGroupService.save(group, orgId);
boolean success = orgGroupUserService.saveRelations(relations);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
Aggregations