generated from root/miduo_server
修改027验证
parent
ac0ed67ac4
commit
1acbe09e3e
|
@ -254,8 +254,8 @@ public class GetUserController extends HttpServlet {
|
|||
*/
|
||||
public void do027Get(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
|
||||
DBObject res = new BasicDBObject();
|
||||
String openId = request.getParameter("openId");
|
||||
if (openId == null) {
|
||||
String tranOpenId = request.getParameter("openId");
|
||||
if (tranOpenId == null) {
|
||||
returnErrorToFront(res,response, "openId is empty");
|
||||
return;
|
||||
}
|
||||
|
@ -286,7 +286,8 @@ public class GetUserController extends HttpServlet {
|
|||
String pid = request.getParameter("pid");
|
||||
String channel = request.getParameter("channel");
|
||||
String sub_channel = request.getParameter("sub_channel");
|
||||
LOGGER.info("the 027 get opendId = {},token={},platform={} admin=>{} channel=>{} sub_channel={}",openId,token,platform,admin,channel,sub_channel);
|
||||
String openId = null;
|
||||
LOGGER.info("the 027 get opendId = {},token={},platform={} admin=>{} channel=>{} sub_channel={}",tranOpenId,token,platform,admin,channel,sub_channel);
|
||||
try {
|
||||
//根据前端发过来的种类进行校验
|
||||
if(channel==null|| channel.isEmpty()){
|
||||
|
@ -294,12 +295,12 @@ public class GetUserController extends HttpServlet {
|
|||
}
|
||||
// 内网或者 游心 开天,不需要验证
|
||||
if (AppConstans.appsecret.equals(admin) || "YX_YSL".equals(channel) || "KT".equals(channel)) {
|
||||
|
||||
openId = tranOpenId;
|
||||
} else {
|
||||
openId = serviceMap.get(channel).verifyGetOpenId(response, request, admin, platform, pid, openId, token);
|
||||
openId = serviceMap.get(channel).verifyGetOpenId(response, request, admin, platform, pid, tranOpenId, token);
|
||||
}
|
||||
if(openId == null){
|
||||
returnErrorToFront(res,response,"校验失败,请重新登录");
|
||||
returnErrorToFront(res,response,"validate error,login again");
|
||||
return;
|
||||
}
|
||||
String banInfo = BaseGlobal.getInstance().redisApp.get(RedisKey.Ban_Open_Id, openId, String.class, -1);
|
||||
|
|
Loading…
Reference in New Issue