admin
2020-05-16 03f9370b85d930bd232f72721e826b5875f898cb
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserAccountController.java
@@ -69,6 +69,7 @@
import com.yeshi.fanli.util.RedisManager;
import com.yeshi.fanli.util.StringUtil;
import com.yeshi.fanli.util.ThreadUtil;
import com.yeshi.fanli.util.VersionUtil;
import com.yeshi.fanli.util.account.UserUtil;
import com.yeshi.fanli.util.wx.WXLoginUtil;
@@ -174,7 +175,6 @@
   @Resource
   private DeviceActiveService deviceActiveService;
   /**
    * 
    * @param acceptData
@@ -192,6 +192,13 @@
   public void login(AcceptData acceptData, String code, String vcode, String phone, boolean wxinstall,
         String tbOpenid, String tbNickName, String tbPortrait, String tbSession, int loginType, Boolean first,
         HttpSession session, HttpServletRequest request, PrintWriter out) {
      // 2.0以下版本不允许登录
      if (!VersionUtil.greaterThan_2_0(acceptData.getPlatform(), acceptData.getVersion())) {
         out.print("请升级到最新版本");
         return;
      }
      BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
            acceptData.getPackages());
      if (system == null) {
@@ -259,14 +266,6 @@
         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());
                  // 绑定oppo,vivo推送
                  DeviceActive active = deviceActiveService.getFirstActiveInfo(acceptData.getDevice());
                  if (active != null) {
@@ -306,6 +305,12 @@
   @RequestMapping(value = "register")
   public void register(AcceptData acceptData, String tbOpenid, String tbNickName, String tbPortrait, String vcode,
         String phone, HttpServletRequest request, HttpSession session, PrintWriter out) {
      // 2.0以下版本不允许登录
      if (!VersionUtil.greaterThan_2_0(acceptData.getPlatform(), acceptData.getVersion())) {
         out.print("请升级到最新版本");
         return;
      }
      BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
            acceptData.getPackages());
      if (system == null) {
@@ -355,7 +360,6 @@
         out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
      }
   }
   /**
    * 获取用户ID
@@ -1145,6 +1149,12 @@
   public void loginNew(AcceptData acceptData, String vcode, String phone, String code, int loginType,
         HttpServletRequest request, PrintWriter out) {
      // 2.0以下版本不允许登录
      if (!VersionUtil.greaterThan_2_0(acceptData.getPlatform(), acceptData.getVersion())) {
         out.print("请升级到最新版本");
         return;
      }
      try {
         BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(),
               acceptData.getPackages());
@@ -1180,20 +1190,6 @@
                     homeNavbarUserService.synchroDeviceToUser(uuser.getId(), device);
                  } catch (Exception e) {
                     LogHelper.errorDetailInfo(e);
                  }
                  /* 同步未登录之前设备抽奖数据 */
                  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, device);
                  } catch (Exception e) {
                     e.printStackTrace();
                  }
                  // 绑定oppo推送