コード例 #1
0
ファイル: Personal.java プロジェクト: Dingmin/leaner
 // 个人简介的更新
 @ResponseBody
 @RequestMapping(value = "intro", method = RequestMethod.POST)
 public String SU_intro(@RequestParam("intro") String intro, HttpSession session) {
   Integer userId = (Integer) session.getAttribute("userID");
   if (userId == null) return "login/login";
   return pojo.In_Up_Del(sql.UPDATE_INTRODUCTION, new Object[] {intro, userId});
 }
コード例 #2
0
ファイル: Personal.java プロジェクト: Dingmin/leaner
 // 添加其他信息
 @ResponseBody
 @RequestMapping("otherMesg")
 public String insertOtherMesg(other_infos infos, HttpSession session) {
   if (session.getAttribute("userID") == null) return "-1";
   return pojo.In_Up_Del(
       sql.INSERT_OTHER_INFOS,
       new Object[] {
         (Integer) session.getAttribute("userID"),
         infos.getTitle(),
         infos.getContent(),
         infos.getFilepath(),
         infos.getDate(),
         infos.getType()
       });
 }
コード例 #3
0
ファイル: Personal.java プロジェクト: Dingmin/leaner
  // 个人信息的添加或修改
  @ResponseBody
  @RequestMapping(value = "userinfo", method = RequestMethod.POST)
  public String SU_Userinfo(
      @RequestParam(value = "bithyear", required = false) Integer bithyear,
      @RequestParam(value = "bithmonth", required = false) Integer bithmonth,
      UserInfo user,
      // bithyear bithmonth
      // @RequestParam(value = "borntime", required = false) Date
      // borntime,

      // sureyear suremonth
      @RequestParam(value = "sureyear", required = false) Integer sureyear,
      @RequestParam(value = "suremonth", required = false) Integer suremonth,
      // @RequestParam(value = "job_date", required = false) Date
      // job_date,

      // @RequestParam(value = "title_date", required = false) Date
      // titile_date,

      @RequestParam(value = "jobyear", required = false) Integer jobyear,
      @RequestParam(value = "jobmonth", required = false) Integer jobmonth,
      HttpSession session) {
    Integer userId = (Integer) session.getAttribute("userID");
    System.out.println("fdagdf" + userId);
    if (userId == null) return "login/login";

    // if (id == 0) {
    // System.out.println(userId);
    // Object[] obj = new Object[] { userId,
    // user.getRealname(),user.getSex(), user.getPhone(),user.getNation(),
    // user.getPoli_ca(), bithyear+"-"+bithmonth, user.getIntroduction(),
    // user.getResearchArea(), user.getQqnumber(),
    // user.getIden(), user.getTeacheriden(), user.getTitile(),
    // sureyear+"-"+suremonth,jobyear+"-"+jobmonth, user.getJob_addr(),
    // user.getImg()};
    // System.out.println(obj.toString());
    // return pojo.In_Up_Del(sql.INSERT_USERINFO, obj);
    // } else {
    String name = user.getRealname();
    if (name != null && name != "") user.setName(name);
    Object[] obj =
        new Object[] {
          user.getRealname(),
          user.getSex(),
          user.getPhone(),
          user.getNation(),
          user.getPoli_ca(),
          bithyear + "-" + bithmonth,
          user.getIntroduction(),
          user.getResearchArea(),
          user.getQqnumber(),
          user.getIden(),
          user.getTeacheriden(),
          user.getTitile(),
          sureyear + "-" + suremonth,
          jobyear + "-" + jobmonth,
          user.getJob_addr(),
          user.getName(),
          user.getImg(),
          userId
        };
    System.out.println(obj.toString());
    return pojo.In_Up_Del(sql.UPDATE_USERINFO, obj);
    // }
  }
コード例 #4
0
ファイル: Personal.java プロジェクト: Dingmin/leaner
  // 填写或更新学历信息
  @ResponseBody
  @RequestMapping(value = "degree", method = RequestMethod.POST)
  public String SU_Degree(
      @RequestParam("id") Integer id, // 操作类型 0:保存 1:更新
      @RequestParam(value = "edubg", required = false) String edubg,
      @RequestParam(value = "degree", required = false) String degree,
      @RequestParam(value = "uc_university", required = false) String uc_university,
      // @RequestParam(value = "uc_time", required = false) String
      // uc_time,
      @RequestParam(value = "bkyear", required = false) String bkyear,
      @RequestParam(value = "bkmonth", required = false) String bkmonth,
      @RequestParam(value = "uc_spec", required = false) String uc_spec,
      @RequestParam(value = "mas_university", required = false) String mas_university,
      // @RequestParam(value = "mas_time", required = false) String
      // mas_time,
      @RequestParam(value = "ssyear", required = false) String ssyear,
      @RequestParam(value = "ssmonth", required = false) String ssmonth,
      @RequestParam(value = "mas_spec", required = false) String mas_spec,
      @RequestParam(value = "doc_university", required = false) String doc_university,
      // @RequestParam(value = "doc_time", required = false) String
      // doc_time,
      @RequestParam(value = "bsyear", required = false) String bsyear,
      @RequestParam(value = "bsmonth", required = false) String bsmonth,
      @RequestParam(value = "doc_spec", required = false) String doc_spec,
      @RequestParam(value = "filepath", required = false) String filepath,
      HttpSession session) {
    Integer userId = (Integer) session.getAttribute("userID");
    if (userId == null) return "login/login";

    if (id == 0) {
      System.out.println(degree);
      Object[] obj =
          new Object[] {
            userId,
            edubg,
            degree,
            uc_university,
            bkyear + "-" + bkmonth,
            uc_spec,
            mas_university,
            ssyear + "-" + ssmonth,
            mas_spec,
            doc_university,
            bsyear + "-" + bsmonth,
            doc_spec,
            filepath
          };
      return pojo.In_Up_Del(sql.INSERT_DEGREE, obj);
    } else {
      Object[] obj =
          new Object[] {
            edubg,
            degree,
            uc_university,
            bkyear + "-" + bkmonth,
            uc_spec,
            mas_university,
            ssyear + "-" + ssmonth,
            mas_spec,
            doc_university,
            bsyear + "-" + bsmonth,
            doc_spec,
            id
          };
      return pojo.In_Up_Del(sql.UPDATE_DEGREE, obj);
    }
  }