コード例 #1
0
 /** 账号管理信息 */
 @Background
 void findAccountsInfo() {
   userService
       .findUserAccountManagerDTOByUserId(getUserId())
       .identify(
           kREQ_ID_findUserAccountManagerDTOByUserId = RequestChannel.getChannelUniqueID(), this);
 }
コード例 #2
0
 @Background
 void bindWechatAccount(String openId) {
   // TODO Auto-generated method stub
   userService
       .bindAccount(getUserId(), BUND_TYPE_WECHAT, openId)
       .identify(kREQ_ID_bindWechatAccount = RequestChannel.getChannelUniqueID(), this);
 }
コード例 #3
0
 /** 用第三方的头像更新 */
 @Background
 void bindThirdPhoto(String bindType, String bindValue, String imgUrl) {
   ImgAttachDTO headImg = null;
   if (!StringUtils.isBlank(imgUrl)) {
     byte[] fileBytes = new SimpleDownloader().download(imgUrl);
     if (fileBytes != null && fileBytes.length > 0) {
       headImg = new ImgAttachDTO();
       headImg.setFileBytes(fileBytes);
       headImg.setFileExtension("png");
       headImg.setUserId(getUserId());
     }
   }
   userService
       .bindThirdPortrait(bindType, bindValue, headImg)
       .identify(kREQ_ID_bindThirdPortrait = RequestChannel.getChannelUniqueID(), this);
 }
コード例 #4
0
  /** 用第三方修改头像 */
  @Background
  void modifyUserPhotoInThird(String url) {
    if (!TextUtils.isEmpty(url)) {
      byte[] bytes = new SimpleDownloader().download(url);
      if (bytes != null && bytes.length > 0) {
        modifiedUserPhoto = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);

        ImgAttachDTO imgAttachDTO = new ImgAttachDTO();
        imgAttachDTO.setFileExtension("png");
        imgAttachDTO.setUserId(ZcdhApplication.getInstance().getZcdh_uid());

        imgAttachDTO.setFileBytes(bytes);
        userService
            .updateImgInUserHomePage(imgAttachDTO)
            .identify(kREQ_ID_updateImgInUserHomePage = RequestChannel.getChannelUniqueID(), this);
      }
    }
  }
コード例 #5
0
 /** 修改头像 */
 @Background
 void modifyUserPhoto(String fileName) {
   Log.i(TAG, "modifyUserPhoto:" + fileName);
   File imgFile = new File(fileName);
   ImgAttachDTO imgAttachDTO = new ImgAttachDTO();
   try {
     imgAttachDTO.setFileBytes(FileIoUtil.read(imgFile));
   } catch (IOException e) {
     e.printStackTrace();
   }
   imgAttachDTO.setFileExtension("jpg");
   imgAttachDTO.setFileName(fileName);
   imgAttachDTO.setFileSize(imgFile.length());
   imgAttachDTO.setUserId(ZcdhApplication.getInstance().getZcdh_uid());
   userService
       .updateImgInUserHomePage(imgAttachDTO)
       .identify(kREQ_ID_updateImgInUserHomePage = RequestChannel.getChannelUniqueID(), this);
 }
コード例 #6
0
 @Background
 void unbindQQAccount() {
   userService
       .unBindAccount(getUserId(), BUND_TYPE_QQ, qqOpenId)
       .identify(kREQ_ID_unbindQQAccount = RequestChannel.getChannelUniqueID(), this);
 }
コード例 #7
0
 @Background
 void unbindWeiBoAccount() {
   userService
       .unBindAccount(getUserId(), BUND_TYPE_WEIBO, weiboOpenId)
       .identify(kREQ_ID_unbindWeiboAccount = RequestChannel.getChannelUniqueID(), this);
 }
コード例 #8
0
 @Background
 void bindWeiboAccount(String openId) {
   userService
       .bindAccount(getUserId(), BUND_TYPE_WEIBO, openId)
       .identify(kREQ_ID_bindWeiboAccount = RequestChannel.getChannelUniqueID(), this);
 }
コード例 #9
0
 /** 查找用户头像 */
 @Background
 void findUserHeadPhoto() {
   userService
       .findThirdImgURLDTOByUserId(getUserId())
       .identify(kREQ_ID_findThirdImgURLDTOByUserId = RequestChannel.getChannelUniqueID(), this);
 }