| | |
| | | import com.yeshi.fanli.entity.bus.user.ForbiddenUserIdentifyCode.ForbiddenUserIdentifyCodeTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.LoginResult;
|
| | | import com.yeshi.fanli.entity.bus.user.SMSHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.UserAccountBindingHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.WeiXinUser;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.ShamUserService;
|
| | | import com.yeshi.fanli.service.inter.user.SpreadUserImgService;
|
| | | import com.yeshi.fanli.service.inter.user.TBPidService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountBindingHistoryService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserMoneyService;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserMoneyService userMoneyService;
|
| | | |
| | |
|
| | | @Resource
|
| | | private UserAccountBindingHistoryService userAccountBindingHistoryService;
|
| | |
|
| | | private static final String PASSWORD_MAX_ERROR = "password_max_error";
|
| | | private static final String EXTRACT_MIN_MONEY = "extract_min_money";
|
| | |
| | | }
|
| | | redisManager.cacheCommonString(key, "1", 120);
|
| | |
|
| | | |
| | |
|
| | | // 支付宝绑定
|
| | | ForbiddenUserIdentifyCode ic = forbiddenUserIdentifyCodeService
|
| | | .listByTypeAndIdentifyCode(ForbiddenUserIdentifyCodeTypeEnum.alipayAccount, account);
|
| | |
| | | deviceTokenHWService.unBindDeviceToken(acceptData.getDevice());
|
| | | out.print(JsonUtil.loadTrueResult(""));
|
| | | }
|
| | | |
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 新版登录 V1.5.3
|
| | | * 新版登录 V1.5.3
|
| | | * |
| | | * @param acceptData
|
| | | * @param vcode
|
| | | * @param phone
|
| | | * @param code
|
| | | * @param loginType 登录方式: 1-手机登录 2-微信登录
|
| | | * @param loginType
|
| | | * 登录方式: 1-手机登录 2-微信登录
|
| | | * @param request
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "loginNew", method = RequestMethod.POST)
|
| | | public void loginNew(AcceptData acceptData, String vcode, String phone, String code,
|
| | | int loginType, HttpServletRequest request, PrintWriter out) {
|
| | | |
| | | public void loginNew(AcceptData acceptData, String vcode, String phone, String code, int loginType,
|
| | | HttpServletRequest request, PrintWriter out) {
|
| | |
|
| | | try {
|
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
|
| | | acceptData.getPackages());
|
| | |
| | | out.print(JsonUtil.loadFalseResult("系统不存在"));
|
| | | return;
|
| | | }
|
| | | |
| | |
|
| | | UserInfo userInfo = null;
|
| | | // 手机登录
|
| | | if (loginType == 1) {
|
| | | userInfo = userAccountService.loginPhone(request, loginType, vcode, phone, system.getAppid());
|
| | | }
|
| | | |
| | |
|
| | | // 微信登录
|
| | | if (loginType == 2) {
|
| | | userInfo = userAccountService.loginWinXin(request,loginType, code, system.getAppid());
|
| | | userInfo = userAccountService.loginWinXin(request, loginType, code, system.getAppid());
|
| | | }
|
| | | |
| | |
|
| | | if (userInfo == null) {
|
| | | out.print(JsonUtil.loadFalseResult("登录失败"));
|
| | | } else {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("userInfo", UserUtil.filterForClientUser(userInfo));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | |
| | |
|
| | | final UserInfo uuser = userInfo;
|
| | | ThreadUtil.run(new Runnable() {
|
| | | public void run() {
|
| | | try {
|
| | | /* 同步未登录之前设备抽奖数据 */
|
| | | /* 同步未登录之前设备抽奖数据 */
|
| | | int platformType = 0;
|
| | | String platform = acceptData.getPlatform();
|
| | | if ("android".equals(platform)) {
|
| | |
| | | } else if ("ios".equals(platform)) {
|
| | | platformType = 2;
|
| | | }
|
| | | userSystemCouponService.copyLotteryPrize(uuser.getId(), platformType, acceptData.getDevice());
|
| | | userSystemCouponService.copyLotteryPrize(uuser.getId(), platformType,
|
| | | acceptData.getDevice());
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | |
| | |
|
| | | } catch (UserAccountException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
|
| | | try {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 绑定电话号码 V1.5.3
|
| | | * 绑定电话号码 V1.5.3
|
| | | *
|
| | | * @param acceptData
|
| | | * @param vcode
|
| | |
| | | */
|
| | | @RequestMapping(value = "bindPhoneNew")
|
| | | public void bindPhoneNew(AcceptData acceptData, Long uid, String vcode, String phone, PrintWriter out) {
|
| | | |
| | |
|
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
|
| | | acceptData.getPackages());
|
| | | if (system == null) {
|
| | |
| | | }
|
| | |
|
| | | phone = phone.replaceAll(" ", "");
|
| | | |
| | |
|
| | | String oldVCode = redisManager.getSMSVCode(phone, SMSHistory.TYPE_BIND);
|
| | | if (Constant.IS_OUTNET) {
|
| | | if (!vcode.equalsIgnoreCase(oldVCode)) {
|
| | |
| | | }
|
| | | redisManager.clearSMSFrequencyLimit(phone, SMSHistory.TYPE_BIND);
|
| | | }
|
| | | |
| | | |
| | |
|
| | | try {
|
| | | // 绑定用户
|
| | | userAccountService.bindPhoneNew(uid, phone);
|
| | | |
| | |
|
| | | UserInfo user = userInfoService.getUserByIdWithMybatis(uid);
|
| | | // 判断电话号码是否已经封禁
|
| | | ForbiddenUserIdentifyCode ic = forbiddenUserIdentifyCodeService
|
| | |
| | | out.print(JsonUtil.loadFalseResult(1, "绑定失败"));
|
| | | }
|
| | | }
|
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 更改微信
|
| | | *
|
| | |
| | | public void bindWeiXin(AcceptData acceptData, Long uid, String code, PrintWriter out) {
|
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
|
| | | acceptData.getPackages());
|
| | | |
| | |
|
| | | if (system == null) {
|
| | | out.print(JsonUtil.loadFalseResult("系统不存在"));
|
| | | return;
|
| | |
| | |
|
| | | try {
|
| | | userAccountService.bindWeiXin(uid, code);
|
| | | |
| | |
|
| | | UserInfo user = userInfoService.getUserByIdWithMybatis(uid);
|
| | | // 判断taoBaoUid是否已经封禁
|
| | | ForbiddenUserIdentifyCode ic = forbiddenUserIdentifyCodeService
|