Beispiel #1
0
 /**
  * 跳转到信用分明细
  *
  * @return
  */
 public String userintegralcreditindex() {
   String userId = SqlInfusion.FilteSqlInfusion(request().getParameter("id"));
   String type = SqlInfusion.FilteSqlInfusion(request().getParameter("y"));
   request().setAttribute("i", userId);
   request().setAttribute("y", type);
   return SUCCESS;
 }
Beispiel #2
0
 public String cellPhoneregsinit() throws IOException {
   String cellphone = SqlInfusion.FilteSqlInfusion(paramMap.get("cellphone"));
   String pageId = SqlInfusion.FilteSqlInfusion(paramMap.get("pageId")); // 验证码
   String code = (String) session().getAttribute(pageId + "_checkCode");
   String _code = SqlInfusion.FilteSqlInfusion(paramMap.get("code").toString().trim());
   if (code == null || !_code.equals(code)) {
     JSONUtils.printStr("2"); // 2为验证码错误
     return null;
   }
   if (StringUtils.isBlank(cellphone)) {
     JSONUtils.printStr("3"); // 3为手机验证码为空
     return null;
   }
   try {
     Map<String, String> phonemap = beVipService.queryIsPhoneonUser(cellphone);
     Map<String, String> cellMap = cellPhoneService.queryCellPhone(cellphone);
     if (phonemap != null || cellMap != null) { // 判断手机号码是都否存在
       JSONUtils.printStr("5"); // 5为 手机号码已存在
       return null;
     }
   } catch (SQLException e) {
     log.error(e);
     e.printStackTrace();
     JSONUtils.printStr("2"); //
     return null;
   } catch (DataException e) {
     log.error(e);
     e.printStackTrace();
     JSONUtils.printStr("2"); //
     return null;
   }
   request().setAttribute("cellphone", cellphone);
   JSONUtils.printStr("1"); // 1通过校验
   return null;
 }
Beispiel #3
0
  /**
   * 查询竞拍中的债权
   *
   * @return
   */
  public String queryAuctingDebt() {
    String borrowTitle = SqlInfusion.FilteSqlInfusion(request("borrowTitle"));
    String borrowerName = SqlInfusion.FilteSqlInfusion(request("borrowerName"));
    pageBean.setPageNum(request("curPage"));

    long userId = this.getUserId();
    try {
      assignmentDebtService.queryAuctingDebt(userId, borrowTitle, borrowerName, "2", pageBean);
      List<Map<String, Object>> list = pageBean.getPage();

      if (list != null) {
        Date nowDate = new Date();
        for (Map<String, Object> map : list) {
          Date date = (Date) map.get("remainAuctionTime");
          map.put("remainDays", DateUtil.remainDateToString(nowDate, date));
        }
      }
    } catch (SQLException e) {
      log.error(e);
      e.printStackTrace();
    }

    this.setRequestToParamMap();
    return SUCCESS;
  }
Beispiel #4
0
  /**
   * vip记录表详细内容
   *
   * @return
   * @throws DataException
   * @throws SQLException
   */
  @SuppressWarnings("unchecked")
  public String queryUservipRecoderinfo() throws SQLException, DataException {
    String username = SqlInfusion.FilteSqlInfusion(paramMap.get("username"));
    String apptime = SqlInfusion.FilteSqlInfusion(paramMap.get("apptime"));
    String lasttime = SqlInfusion.FilteSqlInfusion(paramMap.get("lasttime"));
    userManageServic.queryUservipRecoderinfo(pageBean, username, apptime, lasttime);

    int pageNum = (int) (pageBean.getPageNum() - 1) * pageBean.getPageSize();
    request().setAttribute("pageNum", pageNum);
    return SUCCESS;
  }
Beispiel #5
0
  /**
   * 跳转到用户基本信息管理详细信息
   *
   * @return
   * @throws DataException
   * @throws SQLException
   */
  @SuppressWarnings("unchecked")
  public String queryUserManageBaseInfo() throws SQLException, DataException {
    String userName = SqlInfusion.FilteSqlInfusion(paramMap.get("userName"));
    String id = SqlInfusion.FilteSqlInfusion(paramMap.get("id"));
    String idNo = SqlInfusion.FilteSqlInfusion(paramMap.get("idNo"));
    String cellPhone = SqlInfusion.FilteSqlInfusion(paramMap.get("cellPhone"));
    int source = Convert.strToInt(paramMap.get("source"), -1);

    userManageServic.queryUserManageBaseInfo(pageBean, userName, id, idNo, cellPhone, source);
    int pageNum = (int) (pageBean.getPageNum() - 1) * pageBean.getPageSize();
    request().setAttribute("pageNum", pageNum);

    return SUCCESS;
  }
Beispiel #6
0
  /**
   * 用户注册管理列表
   *
   * @return
   * @throws SQLException
   * @throws DataException [参数说明]
   * @return String [返回类型说明]
   * @exception throws [违例类型] [违例说明]
   * @see [类、类#方法、类#成员]
   */
  @SuppressWarnings("unchecked")
  public String findUserRegistList() throws Exception {
    String userName = SqlInfusion.FilteSqlInfusion(paramMap.get("userName"));
    String mobilePhone = SqlInfusion.FilteSqlInfusion(paramMap.get("phone"));
    String startTime = SqlInfusion.FilteSqlInfusion(paramMap.get("startTime"));
    String endTiem = SqlInfusion.FilteSqlInfusion(paramMap.get("endTiem"));
    String userSource = SqlInfusion.FilteSqlInfusion(paramMap.get("source"));

    userManageServic.findUserRegister(
        pageBean, userName, mobilePhone, startTime, endTiem, userSource);
    int pageNum = (int) (pageBean.getPageNum() - 1) * pageBean.getPageSize();
    request().setAttribute("pageNum", pageNum);
    //		session().setAttribute("paramMap", paramMap);
    return SUCCESS;
  }
Beispiel #7
0
  /**
   * 查询竞拍结束的债权
   *
   * @return
   */
  public String queryAuctedDebt() {
    String borrowTitle = SqlInfusion.FilteSqlInfusion(request("borrowTitle"));
    String borrowerName = SqlInfusion.FilteSqlInfusion(request("borrowerName"));
    pageBean.setPageNum(SqlInfusion.FilteSqlInfusion(request("curPage")));

    long userId = this.getUserId();
    try {
      assignmentDebtService.queryAuctingDebt(userId, borrowTitle, borrowerName, "3", pageBean);
    } catch (SQLException e) {
      log.error(e);
      e.printStackTrace();
    }
    this.setRequestToParamMap();
    return SUCCESS;
  }
Beispiel #8
0
  public String findListAfterSetAcconutType() throws Exception {
    //		this.paramMap = (Map<String, String>) session().getAttribute("paramMap");
    String userName = SqlInfusion.FilteSqlInfusion(paramMap.get("userName"));
    String mobilePhone = SqlInfusion.FilteSqlInfusion(paramMap.get("phone"));
    String startTime = SqlInfusion.FilteSqlInfusion(paramMap.get("startTime"));
    String endTiem = SqlInfusion.FilteSqlInfusion(paramMap.get("endTiem"));
    String userSource = SqlInfusion.FilteSqlInfusion(paramMap.get("source"));

    userManageServic.findUserRegister(
        pageBean, userName, mobilePhone, startTime, endTiem, userSource);
    int pageNum = (int) (pageBean.getPageNum() - 1) * pageBean.getPageSize();
    request().setAttribute("pageNum", pageNum);
    //		session().setAttribute("paramMap", paramMap);
    return SUCCESS;
  }
Beispiel #9
0
  /**
   * 导出用户列表信息
   *
   * @return
   */
  @SuppressWarnings("unchecked")
  public String exportusermanageinfo() {
    pageBean.pageNum = 1;
    pageBean.setPageSize(100000);

    try {

      // 用户名
      String userName = SqlInfusion.FilteSqlInfusion(paramMap.get("userName"));
      String realName = SqlInfusion.FilteSqlInfusion(paramMap.get("realName"));
      // 待还款详情
      userManageServic.queryUserManageInfo(pageBean, userName, realName);
      if (pageBean.getPage() == null) {
        getOut().print("<script>alert(' 导出记录条数不能为空! ');window.history.go(-1);</script>");
        return null;
      }
      if (pageBean.getPage().size() > IConstants.EXCEL_MAX) {
        getOut().print("<script>alert(' 导出记录条数不能大于50000条 ');window.history.go(-1);</script>");
        return null;
      }

      HSSFWorkbook wb =
          ExcelUtils.exportExcel(
              "用户列表",
              pageBean.getPage(),
              new String[] {"用户名", "真是姓名", "邮箱", "QQ号码", "手机号码", "注册时间", "最后登录IP"},
              new String[] {
                "username", "realName", "email", "qq", "cellPhone", "createTime", "lastIP",
              });
      this.export(wb, new Date().getTime() + ".xls");
      Admin admin = (Admin) session().getAttribute(IConstants.SESSION_ADMIN);
      operationLogService.addOperationLog(
          "t_person", admin.getUserName(), IConstants.EXCEL, admin.getLastIP(), 0, "导出用户列表基本信息", 2);

    } catch (SQLException e) {

      e.printStackTrace();
    } catch (DataException e) {

      e.printStackTrace();
    } catch (IOException e) {

      e.printStackTrace();
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Beispiel #10
0
  /**
   * 成功竞拍的债权
   *
   * @return
   */
  public String querySucessBuyedDebt() {
    String borrowTitle = SqlInfusion.FilteSqlInfusion(request("borrowTitle"));
    String startTime = SqlInfusion.FilteSqlInfusion(request("startTime"));
    String endTime = SqlInfusion.FilteSqlInfusion(request("endTime"));
    long userId = this.getUserId();
    pageBean.setPageNum(SqlInfusion.FilteSqlInfusion(request("curPage")));
    try {
      auctionDebtService.querySuccessAuctionDebt(borrowTitle, startTime, endTime, userId, pageBean);
    } catch (SQLException e) {
      log.error(e);
      e.printStackTrace();
    }

    this.setRequestToParamMap();
    return SUCCESS;
  }
Beispiel #11
0
  public String updateUserqq() {
    JSONObject obj = new JSONObject();
    String qq = SqlInfusion.FilteSqlInfusion(paramMap.get("qq"));
    long userId = Integer.parseInt(paramMap.get("userId"));
    long result = -1L;
    result = userManageServic.updateUserqq(userId, qq);
    Admin admin = (Admin) session().getAttribute(IConstants.SESSION_ADMIN);

    try {
      if (result >= 1) {
        operationLogService.addOperationLog(
            "t_person",
            admin.getUserName(),
            IConstants.UPDATE,
            admin.getLastIP(),
            0,
            "更新用户基本信息(QQ)",
            2);
        obj.put("msg", "1");
        JSONUtils.printObject(obj);
        return null;
      } else {
        obj.put("msg", "操作失败");
        JSONUtils.printObject(obj);
        return null;
      }
    } catch (IOException e) {
      e.printStackTrace();
    } catch (SQLException e) {
      e.printStackTrace();
    }
    return null;
  }
Beispiel #12
0
  public String cellphoneforgetinit() {
    String cellphone = SqlInfusion.FilteSqlInfusion(request().getParameter("cp"));
    request().setAttribute("cellphone", cellphone);
    String key =
        Encrypt.encryptSES(cellphone + "-" + new Date().getTime() + "", IConstants.BBS_SES_KEY);
    String sign = Encrypt.MD5(key + IConstants.BBS_SES_KEY).substring(0, 10) + key;
    request().setAttribute("sign", sign);

    return SUCCESS;
  }
Beispiel #13
0
  /**
   * 跳转到用户信用积分管理详细
   *
   * @return
   * @throws DataException
   * @throws SQLException
   */
  @SuppressWarnings("unchecked")
  public String queryUserManageintegralinfo() throws SQLException, DataException {
    String username = SqlInfusion.FilteSqlInfusion(paramMap.get("username"));
    int viprecode = Convert.strToInt(paramMap.get("viprecode"), -1);
    int creditcode = Convert.strToInt(paramMap.get("creditcode"), -1);
    userManageServic.queryUserManageintegralinfo(pageBean, username, viprecode, creditcode);
    int pageNum = (int) (pageBean.getPageNum() - 1) * pageBean.getPageSize();
    request().setAttribute("pageNum", pageNum);

    return SUCCESS;
  }
Beispiel #14
0
 public String cellPhonereginit() {
   String cellphone = SqlInfusion.FilteSqlInfusion(request().getParameter("cp"));
   request().setAttribute("cellphone", cellphone);
   return SUCCESS;
 }
Beispiel #15
0
  /**
   * 通过手机更改用户登录密码
   *
   * @return
   * @throws IOException
   */
  public String cellphoneforgetinfo() throws IOException {
    JSONObject obj = new JSONObject();
    String sign = SqlInfusion.FilteSqlInfusion(paramMap.get("cellphone"));
    String mdKey = sign.substring(0, 10);
    String mdValue = sign.substring(10, sign.length());
    String mdCompare = Encrypt.MD5(mdValue + IConstants.BBS_SES_KEY).substring(0, 10);
    String valAll = Encrypt.decryptSES(mdValue, IConstants.BBS_SES_KEY);
    if (!mdKey.equals(mdCompare)) {
      JSONUtils.printStr("签名错误");
      return null;
    }
    String[] keys = valAll.split("-");
    String cellphone = keys[0].toString();
    String dateTime = keys[1].toString();
    long curTime = new Date().getTime();
    // 当用户点击注册时间大于于1分钟
    if (curTime - Long.valueOf(dateTime) >= 60 * 1000) {
      obj.put("mailAddress", "已超时");
      JSONUtils.printObject(obj);
      return null;
    }

    String phonecode = null;
    try {
      Object obje = session().getAttribute("phone");
      if (obje != null) {
        phonecode = obje.toString();
      } else {
        obj.put("mailAddress", "请输入正确的验证码");
        JSONUtils.printObject(obj);
        return null;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }

    if (phonecode != null) {
      if (!phonecode.trim().equals(cellphone.trim())) {
        obj.put("mailAddress", "与获取验证码手机号不一致");
        JSONUtils.printObject(obj);
        return null;
      }
    }
    // 验证码
    String vilidataNum = SqlInfusion.FilteSqlInfusion(paramMap.get("cellcode"));
    if (StringUtils.isBlank(vilidataNum)) {
      obj.put("mailAddress", "请填写验证码");
      JSONUtils.printObject(obj);
      return null;
    }

    String randomCode = null;
    Object objec = session().getAttribute("randomCode");
    if (objec != null) {
      randomCode = objec.toString();
    } else {
      obj.put("mailAddress", "请输入正确的验证码");
      JSONUtils.printObject(obj);
      return null;
    }
    if (randomCode != null) {
      if (!randomCode.trim().equals(vilidataNum.trim())) {

        obj.put("mailAddress", "请输入正确的验证码");
        JSONUtils.printObject(obj);
        return null;
      }
    }
    String password = SqlInfusion.FilteSqlInfusion(paramMap.get("password")); // 用户密码
    if (StringUtils.isBlank(password)) {
      obj.put("mailAddress", "1");
      JSONUtils.printObject(obj);
      return null;
    }
    // 控制长度
    if (password.length() < 6 || password.length() > 20) {
      obj.put("mailAddress", "2");
      JSONUtils.printObject(obj);
      return null;
    }
    String confirmPassword = SqlInfusion.FilteSqlInfusion(paramMap.get("confirmPassword")); // 用户密码
    if (StringUtils.isBlank(confirmPassword)) {
      obj.put("mailAddress", "3");
      JSONUtils.printObject(obj);
      return null;
    }
    // 检查用户是否存在通过手机号码]
    Map<String, String> phonemap = null;

    try {
      phonemap = beVipService.queryIsPhoneonUser(cellphone);
    } catch (SQLException e1) {
      e1.printStackTrace();
    } catch (DataException e1) {
      e1.printStackTrace();
    }
    if (phonemap == null) {
      obj.put("mailAddress", "6");
      JSONUtils.printObject(obj);
      return null;
    }
    Long resutl = -1L;
    try {
      resutl = cellPhoneService.updatepasswordBycellphone(cellphone, password);
      if (resutl <= 0) {
        obj.put("mailAddress", "4");
        JSONUtils.printObject(obj);
        return null;
      } else {
        obj.put("mailAddress", "5");
        JSONUtils.printObject(obj);
        AccountUserDo user = this.getUser();
        bbsRegisterService.doUpdatePwdByAsynchronousMode(user.getUsername(), password, password, 2);
        return null;
      }
    } catch (SQLException e) {
      e.printStackTrace();
    }
    return null;
  }
Beispiel #16
0
  /**
   * * 手机注册
   *
   * @return
   * @throws Exception
   */
  public String cellreginfo() throws Exception {
    JSONObject obj = new JSONObject();
    // 判断手机验证码是否正确 start
    /** 判定用户是否已存在记录 */
    // 验证手机的唯一性
    String cellphone = SqlInfusion.FilteSqlInfusion(paramMap.get("cellphone"));
    Map<String, String> phonemap = null;
    Map<String, String> cellMap = null;
    try {
      phonemap = beVipService.queryIsPhoneonUser(cellphone);
      cellMap = cellPhoneService.queryCellPhone(cellphone);

      if (phonemap != null && cellMap != null) {
        obj.put("mailAddress", "手机已存在");
        JSONUtils.printObject(obj);
        return null;
      }
      if (phonemap == null) {
        String phonecode = null;
        try {
          Object obje = session().getAttribute("phone");
          if (obje != null) {
            phonecode = obje.toString();
          } else {
            if ("2".equals(IConstants.ISDEMO)) {
              obj.put("mailAddress", "请输入正确的验证码");
              JSONUtils.printObject(obj);
              return null;
            }
          }
        } catch (Exception e) {
          e.printStackTrace();
        }
        if (phonecode != null) {
          if (!phonecode.trim().equals(cellphone.trim())) {
            obj.put("mailAddress", "与获取验证码手机号不一致");
            JSONUtils.printObject(obj);
            return null;
          }
        }
        if (!"1".equals(IConstants.ISDEMO)) {
          // 验证码
          String vilidataNum = SqlInfusion.FilteSqlInfusion(paramMap.get("cellcode"));
          if (StringUtils.isBlank(vilidataNum)) {
            obj.put("mailAddress", "请填写验证码");
            JSONUtils.printObject(obj);
            return null;
          }

          String randomCode = null;
          Object objec = session().getAttribute("randomCode");
          if (objec != null) {
            randomCode = objec.toString();
          } else {
            obj.put("mailAddress", "请输入正确的验证码");
            JSONUtils.printObject(obj);
            return null;
          }
          if (randomCode != null) {
            if (!randomCode.trim().equals(vilidataNum.trim())) {

              obj.put("mailAddress", "请输入正确的验证码");
              JSONUtils.printObject(obj);
              return null;
            }
          }
        }
      }
      String userName = SqlInfusion.FilteSqlInfusion(paramMap.get("userName")); // 用户名
      if (userName.length() < 2 || userName.length() > 20) {
        obj.put("mailAddress", "18");
        JSONUtils.printObject(obj);
        return null;
      }
      if (StringUtils.isBlank(userName)) {
        obj.put("mailAddress", "13");
        JSONUtils.printObject(obj);
        return null;
      }
      // 验证用户名木含有特殊字符串处理第一个字符不可以是下划线开始 ^[^@\/\'\\\"#$%&\^\*]+$
      if (userName.replaceAll("^[\u4E00-\u9FA5A-Za-z0-9_]+$", "").length() != 0) {
        obj.put("mailAddress", "20");
        JSONUtils.printObject(obj);
        return null;
      }
      // 判断第一个字符串不能使以下划线开头的
      String fristChar = userName.substring(0, 1);
      if (fristChar.equals("_")) {
        obj.put("mailAddress", "21");
        JSONUtils.printObject(obj);
        return null;
      }
      String password = SqlInfusion.FilteSqlInfusion(paramMap.get("password")); // 用户密码
      String md5Password = password;
      if (StringUtils.isBlank(password)) {
        obj.put("mailAddress", "14");
        JSONUtils.printObject(obj);
        return null;
      }
      String confirmPassword =
          SqlInfusion.FilteSqlInfusion(paramMap.get("confirmPassword")); // 用户密码
      if (StringUtils.isBlank(confirmPassword)) {
        obj.put("mailAddress", "15");
        JSONUtils.printObject(obj);
        return null;
      }
      String refferee = SqlInfusion.FilteSqlInfusion(paramMap.get("refferee"));
      @SuppressWarnings("unused")
      String param = SqlInfusion.FilteSqlInfusion(paramMap.get("param")); // 邀请好友链接携带的参数
      Map<String, Object> map = null;
      long recommendUserId = -1;
      if (StringUtils.isNotBlank(refferee)) {
        Map<String, String> userIdMap = userService.queryIdByUser(refferee); // 根据用户查询用户明细
        if (userIdMap != null) {
          recommendUserId = Convert.strToLong(userIdMap.get("id"), -1);
        }
        map = relationService.isPromoter(refferee);
        if (map == null) {
          refferee = null;
        }
        if (userIdMap == null && map == null) {
          obj.put("mailAddress", "5");
          JSONUtils.printObject(obj);
          return null;
        }
      }
      // 判断密码是否一致
      if (!password.equals(confirmPassword)) {
        obj.put("mailAddress", "1");
        JSONUtils.printObject(obj);
        return null;
      }
      Long userId = -1L;
      Long result = userService.isExistEmailORUserName(null, userName);
      boolean isExist = adminService.isExistUserName(userName);
      if (result > 0 || isExist) { // 用户名重复
        obj.put("mailAddress", "2");
        JSONUtils.printObject(obj);
        return null;
      }
      int typelen = -1;
      Map<String, String> lenMap = null;
      lenMap = userService.querymaterialsauthtypeCount(); // 查询证件类型主表有多少种类型
      if (lenMap != null && lenMap.size() > 0) {
        typelen = Convert.strToInt(lenMap.get("cccc"), -1);
        // 调用service
        if (typelen != -1) {
          // 判断是否使用了加密字符串
          if ("1".equals(IConstants.ENABLED_PASS)) {
            md5Password = com.shove.security.Encrypt.MD5(md5Password.trim());
          } else {
            md5Password = com.shove.security.Encrypt.MD5(md5Password.trim() + IConstants.PASS_KEY);
          }
          userId =
              cellPhoneService.usercellRegister(
                  cellphone, userName, md5Password, refferee, map, typelen); // 注册用户 和  初始化图片资料
        }
      }
      if (userId < 0) { // 注册失败
        obj.put("mailAddress", "4");
        JSONUtils.printObject(obj);
        return null;
      } else {
        // 添加通知默认方法
        homeInfoSettingService.addNotes(userId, true, false, false);
        homeInfoSettingService.addNotesSetting(
            userId, true, true, true, true, true, false, false, false, false, false, false, false,
            false, false, false);
        // ====
        obj.put("mailAddress", "注册成功"); // 注册成功
        JSONUtils.printObject(obj);
      }

      // 修改之前的推荐
      try {
        if (recommendUserId > 0) { // 判断是否为空

          List<Map<String, Object>> list =
              recommendUserService.queryRecommendUser(null, userId, null); // 查询用户是否已经存在关系了。
          if (list != null && list.size() > 0) { // 判断之前是否已经有关系了。
            return null;
          }
          recommendUserService.addRecommendUser(userId, recommendUserId);
        }
      } catch (Exception e) {
        log.error(e);
        e.printStackTrace();
      }
      AccountUserDo user = new AccountUserDo();
      user.setUsername(userName);
      user.setPassword(password);
      user.setEmail("*****@*****.**");
      bbsRegisterService.doRegisterByAsynchronousMode(user);
    } catch (Exception e) {
      obj.put("mailAddress", "16");
      JSONUtils.printObject(obj);
      e.printStackTrace();
      throw e;
    }

    return null;
  }
Beispiel #17
0
  /**
   * 导出用户列表信息
   *
   * @return
   */
  @SuppressWarnings("unchecked")
  public String exportuserInvestInfo() {
    pageBean.pageNum = 1;
    pageBean.setPageSize(100000);

    try {

      // 用户名
      Long uerId = Convert.strToLong(request().getParameter("i"), -1L);
      String createtimeStart = SqlInfusion.FilteSqlInfusion(paramMap.get("createtimeStart"));
      String createtimeEnd = SqlInfusion.FilteSqlInfusion(paramMap.get("createtimeEnd"));
      // 待还款详情
      userManageServic.queryUserManageInvest(pageBean, uerId, createtimeStart, createtimeEnd);
      if (pageBean.getPage() == null) {
        getOut().print("<script>alert(' 导出记录条数不能为空! ');window.history.go(-1);</script>");
        return null;
      }
      if (pageBean.getPage().size() > IConstants.EXCEL_MAX) {
        getOut().print("<script>alert(' 导出记录条数不能大于50000条 ');window.history.go(-1);</script>");
        return null;
      }

      userManageServic.changeFigure(pageBean);
      HSSFWorkbook wb =
          ExcelUtils.exportExcel(
              "用户投资信息列表",
              pageBean.getPage(),
              new String[] {"用户名", "真时姓名", "手机号码", "投资日期", "还款方式", "投资期限", "投资标题", "投资金额"},
              new String[] {
                "username",
                "realName",
                "cellPhone",
                "investTime",
                "paymentMode",
                "deadline",
                "borrowTitle",
                "investAmount",
              });
      this.export(wb, new Date().getTime() + ".xls");
      Admin admin = (Admin) session().getAttribute(IConstants.SESSION_ADMIN);
      operationLogService.addOperationLog(
          "v_t_userManage_invest",
          admin.getUserName(),
          IConstants.EXCEL,
          admin.getLastIP(),
          0,
          "导出用户投资信息列表",
          2);
    } catch (SQLException e) {

      e.printStackTrace();
    } catch (DataException e) {

      e.printStackTrace();
    } catch (IOException e) {

      e.printStackTrace();
    } catch (Exception e) {
      e.printStackTrace();
    }
    return null;
  }
Beispiel #18
0
  /**
   * 更新用户信息
   *
   * @return
   * @throws Exception
   */
  public String userManageUpd() throws Exception {
    // String username = paramMap.get("username");
    String userid = SqlInfusion.FilteSqlInfusion(paramMap.get("id"));
    String realName = SqlInfusion.FilteSqlInfusion(paramMap.get("realName"));
    String highestEdu = SqlInfusion.FilteSqlInfusion(paramMap.get("highestEdu"));
    if (highestEdu.equals("-1")) highestEdu = "";
    String idNo = SqlInfusion.FilteSqlInfusion(paramMap.get("idNo"));
    String address = SqlInfusion.FilteSqlInfusion(paramMap.get("address"));
    String sex = SqlInfusion.FilteSqlInfusion(paramMap.get("sex"));
    // String email = paramMap.get("email");
    String birthday = SqlInfusion.FilteSqlInfusion(paramMap.get("birthday"));
    String cellPhone = SqlInfusion.FilteSqlInfusion(paramMap.get("cellPhone"));

    Long returnupd1 =
        userManageServic.updateUserAllInfo(
            Long.parseLong(userid), realName, highestEdu, idNo, address, sex, birthday, cellPhone);
    if (returnupd1 < 0) {
      JSONUtils.printStr("0");
      return "success";
    }
    String usrCustId = paramMap.get("usrCustId");
    if (returnupd1 == 1) {
      // String cmdId = "AcctModify";
      // 账户信息修改
      String html = ChinaPnRInterface.AccountUpdate(usrCustId);
      JSONUtils.printStr("1");
      sendHtml(html);
    }

    String work_id = SqlInfusion.FilteSqlInfusion(paramMap.get("work_id"));
    if (work_id.equals("")) work_id = "0";
    String job = SqlInfusion.FilteSqlInfusion(paramMap.get("job"));
    String monthlyIncome = SqlInfusion.FilteSqlInfusion(paramMap.get("monthlyIncome"));
    String orgName = SqlInfusion.FilteSqlInfusion(paramMap.get("orgName"));
    String companyTel = SqlInfusion.FilteSqlInfusion(paramMap.get("companyTel"));
    String companyType = SqlInfusion.FilteSqlInfusion(paramMap.get("companyType"));
    String workEmail = SqlInfusion.FilteSqlInfusion(paramMap.get("workEmail"));
    String companyScale = SqlInfusion.FilteSqlInfusion(paramMap.get("companyScale"));
    String companyAddress = SqlInfusion.FilteSqlInfusion(paramMap.get("companyAddress"));
    String workYear = SqlInfusion.FilteSqlInfusion(paramMap.get("workYear"));

    Long returnupd2 =
        userManageServic.updUserWorkAllInfo(
            Long.parseLong(work_id),
            Long.parseLong(userid),
            job,
            monthlyIncome,
            orgName,
            companyTel,
            companyType,
            workEmail,
            companyScale,
            companyAddress,
            workYear);
    if (returnupd2 < 0) {
      JSONUtils.printStr("0");
      return "success";
    }

    JSONUtils.printStr("1");
    return "success";
  }