From 2332243912258086e0f4845789bfe1b385d22625 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=95=B8=E9=9D=9E?= <13281114856@qq.com>
Date: Mon, 30 Jan 2023 17:45:54 +0800
Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E8=AE=BE=E7=BD=AE=E9=85=8D?=
 =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 log-manager/pom.xml                           | 43 +++++++++++++++++--
 log-manager/src/main/bin/deploy.sh            | 17 ++++++++
 .../param/service/impl/ParamServiceImpl.java  | 11 +++++
 3 files changed, 67 insertions(+), 4 deletions(-)

diff --git a/log-manager/pom.xml b/log-manager/pom.xml
index cba92ee..146c6a2 100644
--- a/log-manager/pom.xml
+++ b/log-manager/pom.xml
@@ -82,6 +82,41 @@
 				<skipDeploy>false</skipDeploy>
 			</properties>
 		</profile>
+
+		<profile>
+			<id>yibin-test</id>
+			<properties>
+				<profiles.active>yibin-test</profiles.active>
+				<profiles.server.ip>127.0.0.1</profiles.server.ip>
+				<profiles.server.port>18225</profiles.server.port>
+				<profiles.nginx.port>11092</profiles.nginx.port>
+				<profiles.server.gatewayport>11078</profiles.server.gatewayport>
+				<profiles.server.path>/logservice</profiles.server.path>
+				<profiles.publish.path>/home/publish</profiles.publish.path>
+				<profiles.datasource.uri>
+					<![CDATA[jdbc:mysql://127.0.0.1:3306/log-platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]></profiles.datasource.uri>
+				<profiles.datasource.username>root</profiles.datasource.username>
+				<profiles.datasource.password>nacos@2020</profiles.datasource.password>
+				<profiles.redis.uri>127.0.0.1</profiles.redis.uri>
+				<profiles.redis.port>6379</profiles.redis.port>
+				<profiles.redis.username></profiles.redis.username>
+				<profiles.redis.password>hotel@2020</profiles.redis.password>
+				<profiles.redis.database>9</profiles.redis.database>
+				<profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
+				<profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
+				<profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
+				<profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
+				<profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
+				<profiles.log.level>INFO</profiles.log.level>
+				<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
+				<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
+				<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
+				<profiles.log.path>/home/mortals/app/logs</profiles.log.path>
+				<profiles.filepath>/mortals/app/data</profiles.filepath>
+				<package.environment>test</package.environment>
+				<skipDeploy>false</skipDeploy>
+			</properties>
+		</profile>
 		<profile>
 			<id>product</id>
 			<properties>
@@ -128,21 +163,21 @@
 				<profiles.server.path>/sampleform</profiles.server.path>
 				<profiles.publish.path>/home/publish</profiles.publish.path>
 				<profiles.datasource.uri>
-					<![CDATA[jdbc:mysql://127.0.0.1:3306/log-platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]></profiles.datasource.uri>
+					<![CDATA[jdbc:mysql://172.15.28.121:3306/log-platform?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=Hongkong]]></profiles.datasource.uri>
 				<profiles.datasource.username>root</profiles.datasource.username>
 				<profiles.datasource.password>xhx@2022</profiles.datasource.password>
-				<profiles.redis.uri>127.0.0.1</profiles.redis.uri>
+				<profiles.redis.uri>172.15.28.120</profiles.redis.uri>
 				<profiles.redis.port>6379</profiles.redis.port>
 				<profiles.redis.username></profiles.redis.username>
 				<profiles.redis.password>hotel@2020</profiles.redis.password>
 				<profiles.redis.database>9</profiles.redis.database>
-				<profiles.rabbitmq.host>127.0.0.1</profiles.rabbitmq.host>
+				<profiles.rabbitmq.host>172.15.28.115</profiles.rabbitmq.host>
 				<profiles.rabbitmq.port>5672</profiles.rabbitmq.port>
 				<profiles.rabbitmq.username>taxi_mq</profiles.rabbitmq.username>
 				<profiles.rabbitmq.password>admin@2020</profiles.rabbitmq.password>
 				<profiles.rabbitmq.virtualhost>/</profiles.rabbitmq.virtualhost>
 				<profiles.log.level>INFO</profiles.log.level>
-				<profiles.nacos.server-addr>127.0.0.1:8848</profiles.nacos.server-addr>
+				<profiles.nacos.server-addr>172.15.28.120:8848</profiles.nacos.server-addr>
 				<profiles.nacos.group>DEFAULT_GROUP</profiles.nacos.group>
 				<profiles.nacos.namespace>smart-gov</profiles.nacos.namespace>
 				<profiles.log.path>/home/mortals/app/logs</profiles.log.path>
diff --git a/log-manager/src/main/bin/deploy.sh b/log-manager/src/main/bin/deploy.sh
index 1a37449..f140d60 100644
--- a/log-manager/src/main/bin/deploy.sh
+++ b/log-manager/src/main/bin/deploy.sh
@@ -40,6 +40,13 @@ clear_deploy() {
   rm -rf ${EXECPATH}
 }
 
+#娓呯悊ui
+clear_ui_deploy() {
+  EXEC_UI_PATH=$1
+  rm -rf ${EXEC_UI_PATH}
+  mkdir -p ${EXEC_UI_PATH}
+}
+
 build_service() {
   SERVICE=$1
   EXECPATH=$2
@@ -82,11 +89,21 @@ project_deploy() {
   writelog "${PROJECT_NAME}_deploy_finish"
 }
 
+#閮ㄧ讲鍓嶅彴鏈嶅姟
+project_ui_deploy() {
+  writelog "${PROJECT_NAME}_ui_deploy"
+  clear_ui_deploy ${PROJECT_UI_EXECPATH}
+  tar -zvxf ./${PROJECT_UI_FILENAME} -C ${PUBLISH_PATH}
+  writelog "${PROJECT_NAME}_ui_deploy_finish"
+
+}
 
 #涓诲嚱鏁�
 main() {
   echo "鍚庡彴鏈嶅姟閮ㄧ讲"
   project_deploy
+  echo "鍓嶇鏈嶅姟閮ㄧ讲"
+  project_ui_deploy
   exit ${RETVAL}
 }
 
diff --git a/log-manager/src/main/java/com/mortals/xhx/base/system/param/service/impl/ParamServiceImpl.java b/log-manager/src/main/java/com/mortals/xhx/base/system/param/service/impl/ParamServiceImpl.java
index ce963f0..2a10966 100644
--- a/log-manager/src/main/java/com/mortals/xhx/base/system/param/service/impl/ParamServiceImpl.java
+++ b/log-manager/src/main/java/com/mortals/xhx/base/system/param/service/impl/ParamServiceImpl.java
@@ -1,6 +1,8 @@
 package com.mortals.xhx.base.system.param.service.impl;
 
+import cn.hutool.core.util.StrUtil;
 import com.mortals.framework.exception.AppException;
+import com.mortals.framework.model.Context;
 import com.mortals.framework.service.IParam;
 import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
 import com.mortals.framework.util.DataUtil;
@@ -32,6 +34,15 @@ public class ParamServiceImpl extends AbstractCRUDCacheServiceImpl<ParamDao, Par
         return "ParamEntity.paramKey";
     }
 
+    @Override
+    protected void saveBefore(ParamEntity entity, Context context) throws AppException {
+        //杩囨护鎹㈣绗�
+        entity.setParamKey(StrUtil.removeAllLineBreaks(entity.getParamKey()));
+        entity.setParamValue(StrUtil.removeAllLineBreaks(entity.getParamValue()));
+        super.saveBefore(entity, context);
+    }
+
+
     @Override
     public String getValueByKey(String key) {
         List<ParamEntity> list = this.getCacheList();
-- 
2.24.3