/**
  * 为栏目选择专业
  *
  * @param req
  * @param resp
  * @return
  * @throws Exception 2010-7-11
  */
 public String selkind(HkRequest req, HkResponse resp) throws Exception {
   long companyId = req.getLong("companyId");
   long oid = req.getLongAndSetAttr("oid");
   CmpNav cmpNav = this.cmpNavService.getCmpNav(oid);
   req.setAttribute("cmpNav", cmpNav);
   if (this.isForwardPage(req)) {
     String name = req.getHtmlRow("name");
     long parentId = req.getLongAndSetAttr("parentId");
     CmpStudyKind parent = this.cmpStudyKindService.getCmpStudyKind(companyId, parentId);
     req.setAttribute("parent", parent);
     SimplePage page = req.getSimplePage(20);
     List<CmpStudyKind> list =
         this.cmpStudyKindService.getCmpStudyKindListByCompanyIdAndParentIdEx(
             companyId, parentId, name, page.getBegin(), page.getSize() + 1);
     this.processListForPage(page, list);
     req.setAttribute("list", list);
     return this.getWebPath("admin/cmpnav/selkind.jsp");
   }
   long kindId = req.getLong("kindId");
   if (cmpNav != null) {
     CmpStudyKind cmpStudyKind = this.cmpStudyKindService.getCmpStudyKind(companyId, kindId);
     if (cmpStudyKind == null) {
       return null;
     }
     cmpNav.setKindId(kindId);
     this.cmpNavService.updateCmpNav(cmpNav);
     this.setOpFuncSuccessMsg(req);
   }
   String return_url = req.getReturnUrl();
   if (DataUtil.isEmpty(return_url)) {
     return null;
   }
   return "r:" + return_url;
 }
 /**
  * 显示二级栏目列表
  *
  * @param req
  * @param resp
  * @return
  * @throws Exception 2010-5-11
  */
 public String list2(HkRequest req, HkResponse resp) throws Exception {
   req.setAttribute("active_1", 1);
   long companyId = req.getLong("companyId");
   long parentId = req.getLongAndSetAttr("parentId");
   CmpNav cmpNav = this.cmpNavService.getCmpNav(parentId);
   req.setAttribute("cmpNav", cmpNav);
   if (cmpNav.isArticleList()) {
     SimplePage page = req.getSimplePage(20);
     List<CmpArticle> list =
         this.cmpArticleService.getCmpArticleListByCompanyIdAndCmpNavOid(
             companyId, parentId, null, page.getBegin(), page.getSize() + 1);
     this.processListForPage(page, list);
     req.setAttribute("list", list);
   } else if (cmpNav.isDirectory()) {
     List<CmpNav> list =
         this.cmpNavProcessor.getCmpNavListByCompanyIdAndParentId(companyId, parentId, true);
     int i = 1;
     for (CmpNav o : list) {
       if (o.getOrderflg() <= 0) {
         o.setOrderflg(i);
         this.cmpNavService.updateCmpNavOrderflg(o.getOid(), i);
       }
       i++;
     }
     req.setAttribute("list", list);
   }
   return this.getWebPath("admin/cmpnav/list2.jsp");
 }
Esempio n. 3
0
 /**
  * 与某人的私信对话
  *
  * @param req
  * @param resp
  * @return
  * @throws Exception
  */
 public String chat(HkRequest req, HkResponse resp) throws Exception {
   long userId = this.getLoginUser(req).getUserId();
   long mainId = req.getLongAndSetAttr("mainId");
   int sms = req.getIntAndSetAttr("sms");
   PvtChatMain main = this.msgService.getPvtChatMain(userId, mainId);
   if (main == null) {
     return "r:/h4/op/msg.do";
   }
   if (main.getReadflg() == PvtChatMain.READ_N) {
     this.msgService.setRead(userId, mainId);
   }
   SimplePage page = req.getSimplePage(20);
   List<PvtChat> list = null;
   if (sms == 1) { // 过滤查看短信发送的私信
     list =
         this.msgService.getPvtChatList(
             userId, mainId, PvtChat.SmsFLG_Y, page.getBegin(), page.getSize() + 1);
   } else {
     list = this.msgService.getPvtChatList(userId, mainId, page.getBegin(), page.getSize() + 1);
   }
   this.processListForPage(page, list);
   List<PvtChatVo> volist = PvtChatVo.createVoList(list);
   // 对方是否关注你
   Follow follow = this.followService.getFollow(main.getUser2Id(), userId);
   if (follow == null) {
     req.setAttribute("not_follow", true);
   }
   req.setAttribute("volist", volist);
   req.setAttribute("main", main);
   req.setAttribute("list", list);
   req.setAttribute("canSms", this.isCanSms(req, main.getUser2Id())); // 是否可以发送短信
   return this.getWeb4Jsp("msg/chat.jsp");
 }
Esempio n. 4
0
 /** 私信列表 */
 public String execute(HkRequest req, HkResponse resp) throws Exception {
   SimplePage page = req.getSimplePage(10);
   List<PvtChatMain> list =
       this.msgService.getPvtChatMainList(
           this.getLoginUser(req).getUserId(), page.getBegin(), page.getSize() + 1);
   this.processListForPage(page, list);
   req.setAttribute("list", list);
   return this.getWeb4Jsp("msg/list.jsp");
 }
 /**
  * @param req
  * @param resp
  * @return
  * @throws Exception
  */
 public String list(HkRequest req, HkResponse resp) throws Exception {
   long companyId = req.getLong("companyId");
   SimplePage page = ServletUtil.getSimplePage(req, 6);
   List<CompanyPhoto> list =
       this.companyPhotoService.getPhotoListByCompanyId(
           companyId, page.getBegin(), page.getSize() + 1);
   this.processListForPage(page, list);
   req.setAttribute("list", list);
   return this.getMgrJspPath(req, "photo/list.jsp");
 }
 public String execute(HkRequest req, HkResponse resp) throws Exception {
   long userId = req.getLong("userId");
   req.setAttribute("userId", userId);
   SimplePage page = req.getSimplePage(20);
   req.setAttribute("page", page.getPage());
   List<CompanyReview> reviewlist =
       this.companyService.getCompanyReviewListByUserId(
           userId, page.getBegin(), page.getSize() + 1);
   this.processListForPage(page, reviewlist);
   List<CompanyReviewVo> rvolist =
       CompanyReviewVo.createVoList(reviewlist, HkWebUtil.getLabaUrlInfoWeb(req.getContextPath()));
   List<UserCmpReviewVo> usercmpreviewvolist = UserCmpReviewVo.makeList(rvolist);
   req.setAttribute("usercmpreviewvolist", usercmpreviewvolist);
   User user = this.userService.getUser(userId);
   req.setAttribute("user", user);
   return this.getWeb3Jsp("user/usercmpreviewlist.jsp");
 }