| | |
| | | import com.yeshi.fanli.service.inter.config.SystemService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoV2Service;
|
| | | import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.order.LostOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderItemServcie;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.AccountMessageService;
|
| | | import com.yeshi.fanli.service.inter.user.BindingAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.ExtractService;
|
| | | import com.yeshi.fanli.service.inter.user.MoneyRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.PassWordErrorRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.ShamUserService;
|
| | | import com.yeshi.fanli.service.inter.user.TBPidService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.GsonUtil;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private HongBaoService hongBaoService;
|
| | |
|
| | | |
| | | @Resource
|
| | | private MoneyRecordService moneyRecordService;
|
| | | private HongBaoV2Service hongBaoV2Service;
|
| | |
|
| | | @Resource
|
| | | private BindingAccountService bindingAccountService;
|
| | |
| | | private ExtractService extractService;
|
| | |
|
| | | @Resource
|
| | | private PassWordErrorRecordService passWordErrorRecordService;
|
| | |
|
| | | @Resource
|
| | | private ConfigService configService;
|
| | |
|
| | | @Resource
|
| | | private SystemService systemService;
|
| | |
|
| | | |
| | |
|
| | | @Resource
|
| | | private ShamUserService shamUserService;
|
| | |
| | | */
|
| | | @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("系统不存在"));
|
| | | return;
|
| | | }
|
| | |
|
| | | if (loginType == 3)// 验证短信验证码
|
| | | if (loginType == 3 && !Constant.IS_TEST)// 验证短信验证码
|
| | | {
|
| | | String oldVcode = redisManager.getSMSVCode(phone, SMSHistory.TYPE_LOGIN);
|
| | | if (StringUtil.isNullOrEmpty(oldVcode) || !oldVcode.equalsIgnoreCase(vcode)) {
|
| | |
| | | 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()));
|
| | | }
|
| | | }
|
| | |
| | | out.print(JsonUtil.loadFalseResult(1, "获取微信用户信息失败"));
|
| | | return;
|
| | | }
|
| | | user = userAccountService.getUserInfoByWXUnionId(system.getAppid(), weiXinUser.getUnionid());
|
| | | 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)) {
|
| | | user = userAccountService.getUserInfoByTaoBaoOpenId(system.getAppid(), 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)) {
|
| | | user = userAccountService.getUserInfoByPhone(system.getAppid(), phone);
|
| | | try {
|
| | | user = userAccountService.getUserInfoByPhone(system.getAppid(), phone);
|
| | | } catch (UserAccountException e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (user == null) {
|
| | |
| | | redisManager.removeCommonString(key);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | |
| | |
|
| | | @RequestMapping(value = "bindalipaywithverifynew")
|
| | | public void bindAlipayWithVerifyNew(AcceptData acceptData, Long uid, String name, String account, PrintWriter out) {
|
| | |
|
| | |
| | | "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元,提现账号信息有误,请核对后重新填写。";
|
| | |
| | | redisManager.removeCommonString(key);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 获取用户资金详情
|
| | |
| | | }
|
| | |
|
| | | BigDecimal moneyLastMonth = inviteGetMoneyService.getMoneyLastMonth(uid + "");
|
| | | BigDecimal unOpenmoney = hongBaoService.getUnOpenHongBaoByUid(uid);
|
| | | BigDecimal totalFanMoney = hongBaoService.getMyTotalHongBaoByUid(user.getId());
|
| | | BigDecimal unOpenmoney = hongBaoV2Service.getUnRecievedFanLiMoney(uid);
|
| | | BigDecimal totalFanMoney = hongBaoV2Service.getTotalFanLiMoney(uid);
|
| | | JSONObject data = new JSONObject();
|
| | | // IOS端数字按照字符串处理
|
| | | if ("ios".equalsIgnoreCase(acceptData.getPlatform()) && Integer.parseInt(acceptData.getVersion()) > 33) {
|
| | |
| | | data.put("money", user.getMyHongBao().toString());
|
| | | data.put("unGetMoney", unOpenmoney.toString());
|
| | | data.put("totalFanLiMoney", totalFanMoney.toString());// 累计返利
|
| | | data.put("totalTiChengMoney", hongBaoService.getTotalTiChengMoney(uid).toString());// 累计提成
|
| | | data.put("totalUnGetTiChengMoney", hongBaoService.getUnGetTiChengMoney(uid).toString()); // 未到账提成
|
| | | data.put("totalTiChengMoney", hongBaoV2Service.getTotalTiChengMoney(uid).toString());// 累计提成
|
| | | data.put("totalUnGetTiChengMoney", hongBaoV2Service.getUnGetTiChengMoney(uid).toString()); // 未到账提成
|
| | | // 展示提成数据
|
| | | data.put("showTiCheng", hongBaoService.getTotalTiChengCount(uid) > 0);
|
| | | } else {
|
| | |
| | | data.put("money", user.getMyHongBao());
|
| | | data.put("unGetMoney", unOpenmoney);
|
| | | data.put("totalFanLiMoney", totalFanMoney);// 累计返利
|
| | | data.put("totalTiChengMoney", hongBaoService.getTotalTiChengMoney(uid));// 累计提成
|
| | | data.put("totalUnGetTiChengMoney", hongBaoService.getUnGetTiChengMoney(uid)); // 未到账提成
|
| | | data.put("totalTiChengMoney", hongBaoV2Service.getTotalTiChengMoney(uid));// 累计提成
|
| | | data.put("totalUnGetTiChengMoney", hongBaoV2Service.getUnGetTiChengMoney(uid)); // 未到账提成
|
| | | // 展示提成数据
|
| | | data.put("showTiCheng", hongBaoService.getTotalTiChengCount(uid) > 0);
|
| | | data.put("showTiCheng", hongBaoV2Service.getTotalTiChengCount(uid) > 0);
|
| | | }
|
| | |
|
| | | user.setNoOpenHongBao(unOpenmoney);
|