diff --git a/assembly.xml b/assembly.xml
index 2544339..3cf1bc8 100644
--- a/assembly.xml
+++ b/assembly.xml
@@ -11,7 +11,7 @@
${project.build.directory}
${file.separator}
- BeiDouPlatform.jar
+ GameDatabaseService.jar
diff --git a/bin/log_clean.sh b/bin/log_clean.sh
new file mode 100644
index 0000000..5a3fedc
--- /dev/null
+++ b/bin/log_clean.sh
@@ -0,0 +1,3 @@
+# 把下面语句编辑到crontab里,定时清理日志,每天凌晨1点清理日志,保留7天日志
+
+0 1 * * * find /apprun/phoenix_ddos_handle/logs -mtime +7 -name "*.log.*" -exec rm -rf {} \;
\ No newline at end of file
diff --git a/bin/processor_check.sh b/bin/processor_check.sh
new file mode 100644
index 0000000..8a0efc7
--- /dev/null
+++ b/bin/processor_check.sh
@@ -0,0 +1,26 @@
+# crontab里加上进程自动拉起任务,做个简单的监控
+# */1 * * * * source /etc/profile;sh /apprun/${YOUR_APP_NAME}/bin/processor_check.sh
+# processor_check.sh脚本内容如下
+
+#!/bin/bash
+APP_NAME=dispose_platform.jar
+WORK_PATH=$(cd `dirname $0`; pwd)
+
+pids=`ps -ef | grep $APP_NAME | grep -v grep | wc -l`
+if [ "$pids" -le 0 ]
+then
+ echo "start $APP_NAME processor ......"
+ cd $WORK_PATH
+ cd ..
+ nohup sh bin/start.sh >/dev/null 2>&1 &
+ sleep 5
+ pids=`ps -ef | grep $APP_NAME | grep -v grep | wc -l`
+ if [ "$pids" -gt 0 ]
+ then
+ echo "$APP_NAME processor started"
+ else
+ echo "Failed to start $APP_NAME processor"
+ fi
+else
+ echo "$APP_NAME processor is running ......"
+fi
\ No newline at end of file
diff --git a/bin/start.sh b/bin/start.sh
new file mode 100644
index 0000000..a3ada99
--- /dev/null
+++ b/bin/start.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+JAVA_DEBUG_OPTS=" -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8003,server=y,suspend=n "
+JAVA_JMX_OPTS=" -Dcom.sun.management.jmxremote.port=9998 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false "
+JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -server -Xms512M -Xmx512M -Xss256K -XX:MetaspaceSize=16M -XX:MaxMetaspaceSize=128M -XX:MaxDirectMemorySize=1g -XX:SurvivorRatio=8 -XX:+UseG1GC -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/heapdump.hprof"
+WORK_PATH=$(cd `dirname $0`; pwd)
+cd $WORK_PATH
+cd ..
+$JAVA_HOME/bin/java $JAVA_DEBUG_OPTS $JAVA_JMX_OPTS $JAVA_OPTS -jar GameDatabaseService.jar &
diff --git a/bin/stop.sh b/bin/stop.sh
new file mode 100644
index 0000000..63de04c
--- /dev/null
+++ b/bin/stop.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+APP_NAME=GameDatabaseService.jar
+
+pids=`ps -ef | grep $APP_NAME | grep -v grep | awk '{print $2}'`
+for pid in $pids
+do
+ echo stop $APP_NAME java process: $pid
+ kill -9 $pid
+done
+
+nr_pids=`ps -ef | grep $APP_NAME | grep -v grep | wc -l`
+while [ $nr_pids -gt 0 ]
+do
+ nr_pids=`ps -ef | grep $APP_NAME | grep -v grep | wc -l`
+done
\ No newline at end of file
diff --git a/config/application-local.properties b/config/application-local.properties
index 27ffb87..507a1a3 100644
--- a/config/application-local.properties
+++ b/config/application-local.properties
@@ -1,4 +1,4 @@
-server.port=9276
+server.port=9278
server.servlet.context-path=/cmhi
# mysql
diff --git a/pom.xml b/pom.xml
index 558441a..bf7add4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -142,6 +142,11 @@
reactor-core
3.4.16
+
+ org.jboss.xnio
+ xnio-nio
+ 3.8.10.Final
+
diff --git a/src/main/java/com/cmhi/gds/common/ErrorCode.java b/src/main/java/com/cmhi/gds/common/ErrorCode.java
index fcb1417..6fd4d1c 100644
--- a/src/main/java/com/cmhi/gds/common/ErrorCode.java
+++ b/src/main/java/com/cmhi/gds/common/ErrorCode.java
@@ -107,7 +107,7 @@ public enum ErrorCode implements BaseEnum {
/**
* The Err nosuchtype.
*/
- ERR_NOSUCHTYPE(24, "没有这个类型的处置设备"),
+ ERR_NOSUCHTYPE(24, "没有这个类型的设备"),
/**
* The Err removemore.
*/
@@ -144,30 +144,22 @@ public enum ErrorCode implements BaseEnum {
* The Err unabledisposeip.
*/
ERR_UNABLEDISPOSEIP(33, "无法处置该IP"),
- /**
- * The Err haohan error.
- */
- ERR_HAOHAN_ERROR(34, "浩瀚设备返回错误"),
/**
* The Err database.
*/
- ERR_DATABASE(35, "操作数据库失败"),
- /**
- * The Err ipnodevice.
- */
- ERR_IPNODEVICE(36, "找不到处置该IP的设备"),
+ ERR_DATABASE(34, "操作数据库失败"),
/**
* The Err untrusthost.
*/
- ERR_UNTRUSTHOST(37, "未经授权的客户端"),
+ ERR_UNTRUSTHOST(35, "未经授权的客户端"),
/**
* The Err untrusttoken.
*/
- ERR_UNTRUSTTOKEN(38, "未经授权的Token"),
+ ERR_UNTRUSTTOKEN(36, "未经授权的Token"),
/**
* The Err unknowninterface.
*/
- ERR_UNKNOWNINTERFACE(39, "未提供该接口"),
+ ERR_UNKNOWNINTERFACE(37, "未提供该接口"),
/**
* The Err decrypt base 64.
*/
@@ -219,7 +211,7 @@ public enum ErrorCode implements BaseEnum {
/**
* The Err nodevice areacode.
*/
- ERR_NODEVICE_AREACODE(112, "区域无该设备"),
+ ERR_NOSUCH_GAME(112, "该游戏不存在"),
/**
* The Err specifiedip exists.
*/
@@ -232,71 +224,6 @@ public enum ErrorCode implements BaseEnum {
* The Err server processreq.
*/
ERR_SERVER_PROCESSREQ(115, "服务器处理请求错误"),
- /**
- * The Err huawei error.
- */
- ERR_HUAWEI_ERROR(116, "华为设备返回错误"),
- /**
- * The Err pengxin error.
- */
- ERR_PENGXIN_ERROR(117, "鹏信设备返回错误"),
- /**
- * The Err upf error.
- */
- ERR_UPF_ERROR(118, "UPF设备返回错误"),
- /**
- * The Err nosuchumcprotectobject.
- */
- ERR_NOSUCHUMCPROTECTOBJECT(200, "没有找到UMC防护对象"),
-
- /**
- * The Err protectobjectexists.
- */
- ERR_PROTECTOBJECTEXISTS(201, "该防护对象已经存在"),
-
- /**
- * The Err tractionstrategyrunning.
- */
- ERR_TRACTIONSTRATEGYRUNNING(201, "该防护策略正在运行"),
-
- /**
- * The Err nosuchprotectstrategy.
- */
- ERR_NOSUCHPROTECTSTRATEGY(202, "没有该防护策略"),
-
-
- /**
- * The Err businessexists.
- */
- ERR_BUSINESSEXISTS(300, "该业务已经存在"),
-
- /**
- * Err businessnotexists error code.
- */
- ERR_BUSINESSNOTEXISTS(301, "该业务不存在"),
-
- /**
- * Err addbusiness error code.
- */
- ERR_ADDBUSINESS(302, "添加客户业务失败"),
-
- /**
- * Err delbusiness error code.
- */
- ERR_DELBUSINESS(303, "删除客户业务失败"),
-
- /**
- * Err not found device error code.
- */
- ERR_NOTFOUNDDEVICE(304, "找不到设备先添加设备"),
- /**
- * The Err huawei firewall error.
- */
- ERR_HUAWEIFIREWALL_ERROR(305, "华为防火墙返回错误"),
- /**
- * The Err emos create message error.
- */
- EMOS_CREATEMESSAGE_ERROR(306, "EMOS发送信息错误"),
;
/**
diff --git a/src/main/java/com/cmhi/gds/controller/GameDatabaseInfoController.java b/src/main/java/com/cmhi/gds/controller/GameDatabaseInfoController.java
index 98ebaf0..2ffce8b 100644
--- a/src/main/java/com/cmhi/gds/controller/GameDatabaseInfoController.java
+++ b/src/main/java/com/cmhi/gds/controller/GameDatabaseInfoController.java
@@ -6,6 +6,7 @@ import com.cmhi.gds.pojo.dto.protocol.base.ProtocolRespDTO;
import com.cmhi.gds.pojo.dto.protocol.info.GameInfoContent;
import com.cmhi.gds.pojo.dto.protocol.info.GameInfoDetail;
import com.cmhi.gds.pojo.dto.protocol.info.GameListSummary;
+import com.cmhi.gds.pojo.dto.protocol.info.GameServerRet;
import com.cmhi.gds.pojo.dto.protocol.info.GameServerRsp;
import com.cmhi.gds.pojo.dto.protocol.info.GetGameInfoDetailReq;
import com.cmhi.gds.pojo.dto.protocol.info.GetGamesInfoRsp;
@@ -32,6 +33,7 @@ import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
+import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
@@ -51,8 +53,8 @@ public class GameDatabaseInfoController {
@ResponseBody
public ProtocolRespDTO getGameListSummary() {
GetGamesSummaryRsp rspInfo = GetGamesSummaryRsp.builder()
- .items(new ArrayList<>())
- .build();
+ .items(new ArrayList<>())
+ .build();
List gameList = gameDatabaseServiceService.getGameTableSummaryItems();
@@ -60,8 +62,8 @@ public class GameDatabaseInfoController {
for (GameTableItemsSummary v : gameList) {
GameListSummary item = GameListSummary.builder()
- .gameId(v.getGameId())
- .build();
+ .gameId(v.getGameId())
+ .build();
if (!v.getGameFilename().isEmpty()) {
item.setGamesFilename(new ArrayList<>());
@@ -77,11 +79,17 @@ public class GameDatabaseInfoController {
}
rspInfo.setStatus(ErrorCode.ERR_OK.getCode());
- rspInfo.setMessage(new String[]{ErrorCode.ERR_OK.getMsg()});
+ rspInfo.setMessage(new String[] {ErrorCode.ERR_OK.getMsg()});
return ProtocolRespDTO.result(ErrorCode.ERR_OK, rspInfo);
}
+ @PostMapping("gamelistsummary2")
+ @ResponseBody
+ public ProtocolRespDTO getGameListSummary2(@RequestBody ProtocolReqDTO