| | |
| | | import com.yeshi.fanli.service.inter.config.InviteGetMoneyService;
|
| | | 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.order.OrderService;
|
| | | import com.yeshi.fanli.service.inter.push.DeviceTokenHWService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService;
|
| | | import com.yeshi.fanli.service.inter.user.AccountDetailsService;
|
| | | 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.UserAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserSystemCouponService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.GsonUtil;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | | import com.yeshi.fanli.util.account.UserUtil;
|
| | | import com.yeshi.fanli.util.wx.WXLoginUtil;
|
| | |
|
| | |
| | | @Resource
|
| | | private OrderService orderService;
|
| | |
|
| | | @Resource
|
| | | private HongBaoService hongBaoService;
|
| | |
|
| | | @Resource
|
| | | private HongBaoV2Service hongBaoV2Service;
|
| | |
| | |
|
| | | @Resource
|
| | | private LostOrderService lostOrderService;
|
| | |
|
| | | @Resource
|
| | | private OrderItemServcie orderItemServcie;
|
| | |
|
| | | @Resource
|
| | | private AccountDetailsService accountDetailsService;
|
| | |
|
| | | @Resource
|
| | | private AccountMessageService accountMessageService;
|
| | |
| | |
|
| | | @Resource
|
| | | private ForbiddenUserIdentifyCodeService forbiddenUserIdentifyCodeService;
|
| | | |
| | | @Resource
|
| | | private UserSystemCouponService userSystemCouponService;
|
| | |
|
| | | private static final String PASSWORD_MAX_ERROR = "password_max_error";
|
| | | private static final String EXTRACT_MIN_MONEY = "extract_min_money";
|
| | |
| | |
|
| | | if (loginType == 3 && !Constant.IS_TEST)// 验证短信验证码
|
| | | {
|
| | | String oldVcode = redisManager.getSMSVCode(phone, SMSHistory.TYPE_LOGIN);
|
| | | if (StringUtil.isNullOrEmpty(oldVcode) || !oldVcode.equalsIgnoreCase(vcode)) {
|
| | | out.print(JsonUtil.loadFalseResult(90001, "验证码错误"));
|
| | | return;
|
| | | // 苹果应用商店上线测试号码
|
| | | if ("17316780233".equalsIgnoreCase(phone) && "258168".equalsIgnoreCase(vcode)) {
|
| | | ;
|
| | | } else {
|
| | | String oldVcode = redisManager.getSMSVCode(phone, SMSHistory.TYPE_LOGIN);
|
| | | if (StringUtil.isNullOrEmpty(oldVcode) || !oldVcode.equalsIgnoreCase(vcode)) {
|
| | | out.print(JsonUtil.loadFalseResult(90001, "验证码错误"));
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | redisManager.clearSMSFrequencyLimit(phone, SMSHistory.TYPE_LOGIN);
|
| | |
| | | root.put("type", result.getType());
|
| | | root.put("data", data);
|
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | |
| | | final UserInfo uuser = result.getUser();
|
| | | ThreadUtil.run(new Runnable() {
|
| | | public void run() {
|
| | | try {
|
| | | int platformType = 0;
|
| | | String platform = acceptData.getPlatform();
|
| | | if ("android".equals(platform)) {
|
| | | platformType = 1;
|
| | | } else if ("ios".equals(platform)) {
|
| | | platformType = 2;
|
| | | }
|
| | | userSystemCouponService.copyLotteryPrize(uuser.getId(), platformType, acceptData.getDevice());
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | });
|
| | | |
| | | } catch (UserAccountException e) {
|
| | | try {
|
| | | LogHelper.cookieLog("登录出错:" + e.getCode() + "-" + e.getMessage());
|
| | |
| | | }
|
| | | out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | /**
|