예제 #1
0
  @RequestMapping(value = "/society/position.html")
  public ModelAndView societyPage(HttpServletRequest request) {
    ModelAndView mv = new ModelAndView();

    String code = (String) request.getParameter("code");
    System.out.println("-------------code--------" + code);
    HttpSession session = request.getSession();
    String currentOpenId = (String) session.getAttribute("currentOpenId");
    if (currentOpenId == null || currentOpenId.equals("")) {
      currentOpenId =
          WeixinUtil.getOpenidByOauth(JobAppConfig.APP_ID, JobAppConfig.APP_SECRET, code);
      System.out.println("----------------OpenId--------" + currentOpenId);
      session.setAttribute("currentOpenId", currentOpenId);
    }

    mv.setViewName("jobs/jobinfo");

    List<Job> jobList = jobService.selectSocietyJobs();
    mv.addObject("RECRUITMENT_TYPE", "社会招聘");
    mv.addObject("recType", "society");
    mv.addObject("JOBLIST", jobList);

    // DropdownList
    mv.addObject("COMPANYS", companyService.getAllCompany());
    mv.addObject("SUBJECTS", dropdownListService.getDropListByType("EDUCATION"));
    mv.addObject("JOBTYPS", dropdownListService.getDropListByType("JOB_TYPE"));
    return mv;
  }
예제 #2
0
 @RequestMapping(value = "/apply-record.html")
 public ModelAndView applyRecord(HttpServletRequest request) {
   ModelAndView mv = new ModelAndView();
   mv.setViewName("jobs/apply-record");
   // 1.获取用户的openId
   HttpSession session = request.getSession();
   String code = (String) request.getParameter("code");
   String currentOpenId = (String) session.getAttribute("currentOpenId");
   if (currentOpenId == null || currentOpenId.equals("")) {
     currentOpenId =
         WeixinUtil.getOpenidByOauth(JobAppConfig.APP_ID, JobAppConfig.APP_SECRET, code);
     session.setAttribute("currentOpenId", currentOpenId);
   }
   List<MyApply> listMyApply = myApplyService.selectMyApplyByOpenId(currentOpenId);
   int count = listMyApply.size();
   mv.addObject("CONTENT", count);
   mv.addObject("MYAPPLYS", listMyApply);
   return mv;
 }
예제 #3
0
  @RequestMapping(value = "/screenings.html")
  public ModelAndView screenings(HttpServletRequest request) {
    HttpSession session = request.getSession();
    String code = (String) request.getParameter("code");

    // HttpSession session = request.getSession();
    String currentOpenId = (String) session.getAttribute("currentOpenId");
    System.out.println("----------session OpenId---------------" + currentOpenId);
    if (currentOpenId == null || currentOpenId.equals("")) {
      currentOpenId =
          WeixinUtil.getOpenidByOauth(JobAppConfig.APP_ID, JobAppConfig.APP_SECRET, code);
      System.out.println("----------------OpenId --------" + currentOpenId);
      session.setAttribute("currentOpenId", currentOpenId);
    }

    ModelAndView mv = new ModelAndView();
    mv.setViewName("jobs/screenings");
    List<Recruitment> listRecruitment = recruitmentService.selectRecruitments();
    mv.addObject("LISTRECRUITMENT", listRecruitment);
    return mv;
  }