diff --git a/src/main/java/com/ljsd/controller/GetServerListController.java b/src/main/java/com/ljsd/controller/GetServerListController.java index b84a14f..882abaa 100644 --- a/src/main/java/com/ljsd/controller/GetServerListController.java +++ b/src/main/java/com/ljsd/controller/GetServerListController.java @@ -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);