Package com.skyline.user.model

Examples of com.skyline.user.model.User


  }
 
 
  @Test
  public void testQueryPersonInfoByUserID() {
    User user = service.getPersonInfoByUserID(Long.valueOf(4));
    if (user != null) {
      System.out.println(user.getName());
      System.out.println(user.getNickname());
      System.out.println(user.getEmail());
      System.out.println(user.getCity());
      System.out.println(user.getProvince());
      System.out.println(user.getCountry());
      System.out.println(user.getSiteId());
      System.out.println(user.getSex());
      System.out.println(user.getGraduateSchool());
      System.out.println(user.getJob());
      System.out.println(user.getMobilephone());
      System.out.println(user.getMsn());
      System.out.print(user.getQq());
    }
  }
View Full Code Here


 
 
//  /@Test
  public void login(){
    try{
    User user=
    userservice.login("buringcl@163.com", "password","fff");
    if(user!=null) {System.out.println("yes");
    System.out.println(user.getNickname());}
    }
    catch(Exception e){
      e.printStackTrace();
    }
  }
View Full Code Here

 
  //@Test
  public void querySecurityQuestion(){
   
    Date d1 =new Date();
    User user=service.getSecurityQuestion("buringcl@163.com");
    if(user!=null){
      System.out.println(user.getSecurityQuestion());
    }
    Date d2 =new Date();
    System.out.println(d2.getTime()-d1.getTime());
  }
View Full Code Here

    System.out.println(d2.getTime()-d1.getTime());
  }
 
  @Test
  public void queryAccountInfo(){
    User user=service.getAccountInfoByUserID(Long.valueOf(4));
    if(user!=null){
      System.out.println(user.getId());
      System.out.println(user.getSecurityQuestion());
      System.out.println(user.getSecurityAnswer());
      System.out.println(user.getSecurityEmail());
      System.out.println(user.getAuthority());
    }
  }
View Full Code Here

  public static PersonalIfonMapper getMapper() {
    return MAPPER;
  }

  public User mapRow(ResultSet rs, int rowNum) throws SQLException {
    User user = new User();
    user.setBirthday(rs.getDate(COLUMN_BIRTHDAY));
    user.setCity(rs.getString(COLUMN_CITY));
    user.setCountry(rs.getString(COLUMN_COUNTRY));
    user.setEmail(rs.getString(COLUMN_EMAIL));
    user.setGraduateSchool(rs.getString(COLUMN_GRADUATE_SCHOOL));
    user.setJob(rs.getString(COLUMN_JOB));
    user.setNickname(rs.getString(COLUMN_NICKNAME));
    user.setName(rs.getString(COLUMN_NAME));
    user.setProvince(rs.getString(COLUMN_PROVINCE));
    if (rs.getString(COLUMN_SEX) != null)
      user.setSex(Sex.valueOf(rs.getString(COLUMN_SEX)));
    user.setSiteId(rs.getString(COLUMN_SITE_ID));
    user.setMobilephone(rs.getString(COLUMN_MOBILE_PHONE));
    user.setMsn(rs.getString(COLUMN_MSN));
    user.setQq(rs.getString(COLUMN_QQ));
    user.setId(rs.getLong(COLUMN_ID));
    user.setPortrait(rs.getString(COLUMN_PORTRAIT));
    return user;

  }
View Full Code Here

    return mav;
  }

  @RequestMapping(value = "/newalbum", method = RequestMethod.POST)
  public ModelAndView newAlbum(Album album) {
    User user = (User) WebHelper.getSessionAttribute(null, Constant.SESSION_USER);
    if (user == null) {
      throw new NotLoginException("登录后才能创建相册");
    }

    String errMsg = validateForm("newAlbumForm", album);
View Full Code Here

   *            相册ID
   * @param request
   * */
  @RequestMapping(value = "/upload/{albumId}", method = RequestMethod.GET)
  public ModelAndView toUpload(@PathVariable("albumId") Long albumId) {
    User user = (User) WebHelper.getSessionAttribute(null, Constant.SESSION_USER);
    if (user == null) {
      throw new NotLoginException("上传照片必须登录");
    }
    long userId = user.getId();
    Album album = albumService.getAlbumForChange(albumId, userId);
    ModelAndView mav = new ModelAndView(ViewPaths.ALBUM_TOUPLOAD);
    mav.addObject("album", album);
    // WebHelper.saveToken(request);
    return mav;
View Full Code Here

   *            相册ID
   * @param request
   * */
  @RequestMapping(value = "/bupload/{albumId}", method = RequestMethod.GET)
  public ModelAndView btachUpload(@PathVariable("albumId") Long albumId) {
    User user = (User) WebHelper.getSessionAttribute(null, Constant.SESSION_USER);
    if (user == null) {
      throw new NotLoginException("上传照片必须登录");
    }
    long userId = user.getId();
    Album album = albumService.getAlbumForChange(albumId, userId);
    ModelAndView mav = new ModelAndView(ViewPaths.ALBUM_SWFUPLOAD);
    mav.addObject("album", album);
    // WebHelper.saveToken(request);
    return mav;
View Full Code Here

   * */
  @SuppressWarnings("unchecked")
  @RequestMapping(value = "/upload/{albumId}", method = RequestMethod.POST)
  public ModelAndView normalUpload(@PathVariable("albumId") Long albumId, String submitToken,
      MultipartHttpServletRequest request) {
    User user = (User) WebHelper.getSessionAttribute(request, Constant.SESSION_USER);
    if (user == null) {
      throw new NotLoginException("上传照片必须登录");
    }

    String errMsg = validateForm("normalUploadForm", submitToken);
    if (errMsg != null) {
      ModelAndView returnMav = toUpload(albumId);
      return processValidationErrors("errMsg", errMsg, returnMav);
    }

    long userId = user.getId();
    Album album = albumService.getAlbumForChange(albumId, userId);
    List<MultipartFile> files = request.getFiles("file");
    StringBuilder message = new StringBuilder();
    List<SkylineImageResizeTask> tasks = prepareResizeTask(files, userId, albumId, message);
    if (CollectionUtils.isEmpty(tasks)) {
View Full Code Here

  @RequestMapping(value = "/buploadok/{albumId}", method = RequestMethod.POST)
  public @ResponseBody
  Map<String, Object> batchUploadOk(@PathVariable("albumId") Long albumId,
      @RequestParam("files") String files) {
    Map<String, Object> result = new HashMap<String, Object>();
    User user = (User) WebHelper.getSessionAttribute(null, Constant.SESSION_USER);
    if (user == null) {
      result.put("success", Boolean.FALSE);
      result.put("errmsg", "压缩图片必须");
      result.put("logined", Boolean.FALSE);
      return result;
    } else {
      result.put("logined", Boolean.TRUE);
    }

    long userId = user.getId();
    String[] filesPath = files.split("\\|");
    List<File> localFiles = new ArrayList<File>(filesPath.length);
    for (String filePath : filesPath) {
      if (!StringUtils.hasLength(filePath)) {
        continue;
View Full Code Here

TOP

Related Classes of com.skyline.user.model.User

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.