@At("/TobindBussinessJsp") @Ok("jsp:weichatjsp.${obj}") public String singalbindBussiness(@Param("code") String code,@Param("openId") String openId, HttpServletRequest request) { String obj="discount_open"; if( null != openId && "" != openId ){ }else { openId = CommonUtil.getOpenId(code); } TUser tuser = userService.findTUserByOpenId(openId); int isBindMobile =0; if(null != tuser && null != tuser.getId() && tuser.getId() >0 ){ isBindMobile =1; //已绑定手机,跳转到业务绑定 } int isBindBusiness = 0; Integer model = null; if(tuser != null) { model = tuser.getMode(); } if(isBindMobile == 1 && model != null) { isBindBusiness = 1; request.setAttribute("model", model); obj="discount_update"; } request.setAttribute("isBindBusiness", isBindBusiness); request.setAttribute("isBindMobile", isBindMobile); request.setAttribute("openId", openId); return obj; }
@At("/login") @Ok("redirect:${obj==true?'/home':'/toLogin'}") @Filters public boolean login(HttpServletRequest req,HttpSession session){ String userName=req.getParameter("name"); String pwd=req.getParameter("pwd"); boolean result=false; if(!isBlank(userName) && !isBlank(pwd)){ User user=new User(); if(user!=null){ result=true;//此时登录成功 session.setAttribute("user", user); } return result; }
捐助开发者
在兴趣的驱动下,写一个免费
的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(右上角的爱心标志,支持支付宝和PayPal捐助),没钱捧个人场,谢谢各位。
谢谢您的赞助,我会做的更好!