| | |
| | | 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;
|
| | |
|
| | |
| | | @Resource
|
| | | private DeviceActiveService deviceActiveService;
|
| | |
|
| | |
|
| | | /**
|
| | | *
|
| | | * @param acceptData
|
| | |
| | | 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) {
|
| | |
| | |
|
| | | } catch (UserAccountException e) {
|
| | | try {
|
| | | LogHelper.cookieLog("登录出错:" + e.getCode() + "-" + e.getMessage());
|
| | | LogHelper.error("登录出错:" + e.getCode() + "-" + e.getMessage());
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | |
| | | @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) {
|
| | |
| | | out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 获取用户ID
|
| | |
| | | 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());
|
| | |
| | | } catch (UserAccountException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg()));
|
| | | try {
|
| | | LogHelper.cookieLog("登录出错:" + e.getCode() + "-" + e.getMessage());
|
| | | LogHelper.error("登录出错:" + e.getCode() + "-" + e.getMessage());
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|