admin
2018-12-18 76b85f9a182939d6513b9f2b59c3849ade56b537
fanli/src/main/java/com/yeshi/fanli/controller/client/UserAccountController.java
@@ -93,8 +93,6 @@
   @Resource
   private SystemService systemService;
   @Resource
   private ShamUserService shamUserService;
@@ -152,8 +150,8 @@
    */
   @RequestMapping(value = "login")
   public void login(AcceptData acceptData, String code, String vcode, String phone, boolean wxinstall,
         String tbOpenid, String tbNickName, String tbPortrait, int loginType, Boolean first, HttpSession session,HttpServletRequest request,
         PrintWriter out) {
         String tbOpenid, String tbNickName, String tbPortrait, int loginType, Boolean first, HttpSession session,
         HttpServletRequest request, PrintWriter out) {
      System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
      if (system == null) {
         out.print(JsonUtil.loadFalseResult("系统不存在"));
@@ -195,6 +193,11 @@
         root.put("data", data);
         out.print(JsonUtil.loadTrueResult(root));
      } catch (UserAccountException e) {
         try {
            LogHelper.cookieLog("登录出错:" + e.getCode() + "-" + e.getMessage());
         } catch (Exception e1) {
            e1.printStackTrace();
         }
         out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
      }
   }
@@ -319,11 +322,35 @@
            out.print(JsonUtil.loadFalseResult(1, "获取微信用户信息失败"));
            return;
         }
         try {
         user = userAccountService.getUserInfoByWXUnionId(system.getAppid(), weiXinUser.getUnionid());
         } catch (UserAccountException e) {
            try {
               LogHelper.errorDetailInfo(e, null, "获取用户信息出错");
            } catch (Exception e1) {
               e1.printStackTrace();
            }
         }
      } else if (!StringUtil.isNullOrEmpty(tbOpenid)) {
         try {
         user = userAccountService.getUserInfoByTaoBaoOpenId(system.getAppid(), tbOpenid);
         } catch (UserAccountException e) {
            try {
               LogHelper.errorDetailInfo(e);
            } catch (Exception e1) {
               e1.printStackTrace();
            }
         }
      } else if (!StringUtil.isNullOrEmpty(phone)) {
         try {
         user = userAccountService.getUserInfoByPhone(system.getAppid(), phone);
         } catch (UserAccountException e) {
            try {
               LogHelper.errorDetailInfo(e);
            } catch (Exception e1) {
               e1.printStackTrace();
            }
         }
      }
      if (user == null) {
@@ -715,8 +742,6 @@
      }
   }
   
   @RequestMapping(value = "bindalipaywithverifynew")
   public void bindAlipayWithVerifyNew(AcceptData acceptData, Long uid, String name, String account, PrintWriter out) {
@@ -762,7 +787,8 @@
            "PERMIT_CHECK_PERM_IDENTITY_THEFT", "PERMIT_NON_BANK_LIMIT_PAYEE", "EXCEED_LIMIT_UNRN_DM_AMOUNT" };
      try {
         BindingAccount bindingAccount = bindingAccountService.changeAlipayBindingWithVerify(uid, name, account);
         out.print(JsonUtil.loadTrue(0, JsonUtil.getGson().toJson(bindingAccount), "系统已成功转账0.1元到提现账号中,提现账号验证通过,恭喜你!可以提现了。"));
         out.print(JsonUtil.loadTrue(0, JsonUtil.getGson().toJson(bindingAccount),
               "系统已成功转账0.1元到提现账号中,提现账号验证通过,恭喜你!可以提现了。"));
      } catch (AlipayTransferException e1) {
         if (e1.getSubCode().equalsIgnoreCase("PAYEE_NOT_EXIST")) {
            String msg = "系统未能成功转账0.1元,提现账号信息有误,请核对后重新填写。";
@@ -806,7 +832,6 @@
         redisManager.removeCommonString(key);
      }
   }
   /**
    * 获取用户资金详情