check parm

master
wangyuan 2019-09-11 14:09:43 +08:00
parent 413859fc59
commit 69abb67c93
1 changed files with 6 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import com.ljsd.pojo.UserRecentLoginInfo;
import com.ljsd.pojo.UserServerInfo;
import com.ljsd.redis.RedisKey;
import com.ljsd.util.BaseGlobal;
import com.ljsd.util.StringUtils;
import com.mongodb.BasicDBObject;
import com.mongodb.DBObject;
import com.mongodb.util.JSON;
@ -40,6 +41,11 @@ public class GetServerListController extends HttpServlet {
String channel = request.getParameter("channel");
String sub_channel = request.getParameter("sub_channel");
String plat = request.getParameter("plat");
if(StringUtils.checkIsEmpty(openId) || StringUtils.checkIsEmpty(channel) ||
StringUtils.checkIsEmpty(sub_channel) || StringUtils.checkIsEmpty(plat) ){
response.sendError(400, "parm is wrong");
return;
}
DBObject req = new BasicDBObject();
DBObject whiteList = BaseGlobal.getInstance().mongoDBPool.findOne(_WHITE_LIST,openId);
req.put("channel", channel);