use of com.ngtesting.platform.entity.TestMsg in project ngtesting-platform by aaronchen2k.
the class MsgAction method markRead.
@AuthPassport(validate = true)
@RequestMapping(value = "markRead", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> markRead(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");
TestMsg msg = msgService.markReadPers(id, userVo.getId());
TestMsgVo vo = msgService.genVo(msg);
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.entity.TestMsg in project ngtesting-platform by aaronchen2k.
the class MsgServiceImpl method markReadPers.
@Override
public TestMsg markReadPers(Long id, Long id1) {
TestMsg po = (TestMsg) get(TestMsg.class, id);
po.setRead(Boolean.TRUE);
saveOrUpdate(po);
return po;
}
Aggregations