跳转连接转base64
阅读原文时间:2023年07月16日阅读:1

//配置H5连接

@Value("${h5.domain}")
private String h5Domain;

// 校验商家端权限  
public String checkStatus() throws IOException {  
    String sbURL = getRequest().getRequestURL().toString();  
    member = sessionWeixinMember();  
    if (member == null) {  
        return "timeout";  
    }  
    MembersStalls membersStalls = membersStallsService.getMstallByMId(  
            member.getId(), 2);  
    if (membersStalls != null) {// 用户拥有备餐权限  
        //判断用户是否已经完善了手机号码  
        if(member.getPhone()==null || "".equals(member.getPhone())){  
            getResponse().sendRedirect(h5Domain+"/site/account/account\_prompt.html?returnUrl="+Base64.encodeBase64String(sbURL.getBytes()));  
        }  
        return "redirectToReadByOrder";// 跳到今日订单页面  
    }else{//没有权限  
        getResponse().sendRedirect(h5Domain+"/merchants/file/account/setshop\_way.html");  
    }  
    return "checkstatus";  
}