generated from root/miduo_server
细节优化
parent
6f48d32ed7
commit
23e2f1c9c5
|
|
@ -54,8 +54,8 @@ public class GmController {
|
|||
}
|
||||
// 扶持删除条目
|
||||
if (cmd.contains("support#remove#")){
|
||||
String[] split = cmd.split("#");
|
||||
supportController.removeSupportOrderById(Integer.parseInt(split[2]));
|
||||
// String[] split = cmd.split("#");
|
||||
// supportController.removeSupportOrderById(Integer.parseInt(split[2]));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,10 +60,6 @@ public class LoginController {
|
|||
* @param content
|
||||
*/
|
||||
public static void addQueue(String content) {
|
||||
// 只存储最新的十条数据
|
||||
if (queue.size() >= 10){
|
||||
queue.poll();
|
||||
}
|
||||
queue.offer(content);
|
||||
}
|
||||
|
||||
|
|
@ -71,7 +67,7 @@ public class LoginController {
|
|||
* 消息处理
|
||||
*/
|
||||
public static void sessionHandler(){
|
||||
String str = null;
|
||||
String str;
|
||||
while ((str = queue.poll()) != null){
|
||||
sessionMaps.put(String.valueOf(sessionId),str,10*60*1000);
|
||||
sessionId++;
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@
|
|||
var aObj = document.getElementById("sessions");
|
||||
if (data != "" && null != data){
|
||||
var list = data.split("|");
|
||||
aObj.innerText = list.length+"";
|
||||
aObj.innerText = (list.length-1)+"";
|
||||
aObj.style.color = "red";
|
||||
// 消息体
|
||||
sessionShow(list);
|
||||
|
|
|
|||
Loading…
Reference in New Issue