Package net.yanhl.talk.pojo

Examples of net.yanhl.talk.pojo.Talk


  public ActionForward addMessage(ActionMapping mapping, ActionForm actionForm, HttpServletRequest request,
      HttpServletResponse response) throws Exception {
    try {
      JSONObject jsonObject = readJson(request);
      Talk talk = (Talk) JSONObject.toBean(jsonObject, Talk.class);
      talk.setUser(UserUtil.getUserFromSession(request));
      talk.setMsgDate(new Timestamp(System.currentTimeMillis()));
      getBaseManager().save(talk);
      print(response, RESBONSE_SUCCESS);
    } catch (Exception e) {
      e.printStackTrace();
      print(response, RESBONSE_ERROR);
View Full Code Here


//      log.info("用户<" + UserUtil.getCurrentUserName(request) + ">最后更新日期:" + StringUtil.getValue(lastDate,"datetime"));
//      java.text.SimpleDateFormat sftime = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//      Date lastDate = sftime.parse(StringUtil.getValue(request,"lastDate"));
      List<Talk> lastMsgs = talkManager.getMsg(userId, lastDate);
      if(lastMsgs.size() > 0) {
        Talk talk = lastMsgs.get(lastMsgs.size()-1);
        lastDate = talk.getMsgDate();
//        log.info("得到最后一个消息日期=" + talk);
      } else {
        lastDate = Calendar.getInstance().getTime();
//        log.info("设置lastDate为当前时间");
      }
View Full Code Here

TOP

Related Classes of net.yanhl.talk.pojo.Talk

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.