+ *
+ * @author chenle
+ * @date 2021-12-30 9:54
+ */
+
+
+public class IPUtils {
+ /**
+ * 获取用户真实IP地址,不使用request.getRemoteAddr()的原因是有可能用户使用了代理软件方式避免真实IP地址,
+ * 可是,如果通过了多级反向代理的话,X-Forwarded-For的值并不止一个,而是一串IP值
+ *
+ * @return ip
+ */
+ public static String getRealIP(HttpServletRequest request) {
+ String ip = request.getHeader("x-forwarded-for");
+ if (ip != null && ip.length() != 0 && !"unknown".equalsIgnoreCase(ip)) {
+ // 多次反向代理后会有多个ip值,第一个ip才是真实ip
+ if( ip.indexOf(",")!=-1 ){
+ ip = ip.split(",")[0];
+ }
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getHeader("Proxy-Client-IP");
+ System.out.println("Proxy-Client-IP ip: " + ip);
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getHeader("WL-Proxy-Client-IP");
+ System.out.println("WL-Proxy-Client-IP ip: " + ip);
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getHeader("HTTP_CLIENT_IP");
+ System.out.println("HTTP_CLIENT_IP ip: " + ip);
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getHeader("HTTP_X_FORWARDED_FOR");
+ System.out.println("HTTP_X_FORWARDED_FOR ip: " + ip);
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getHeader("X-Real-IP");
+ System.out.println("X-Real-IP ip: " + ip);
+ }
+ if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+ ip = request.getRemoteAddr();
+ System.out.println("getRemoteAddr ip: " + ip);
+ }
+ return ip;
+ }
+}
diff --git a/stwzhj-modules/wzhj-system/src/main/resources/mapper/system/MapPolygonMapper.xml b/stwzhj-modules/wzhj-system/src/main/resources/mapper/system/MapPolygonMapper.xml
new file mode 100644
index 00000000..1ff8189f
--- /dev/null
+++ b/stwzhj-modules/wzhj-system/src/main/resources/mapper/system/MapPolygonMapper.xml
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, name, type, dept_id, address, remark,
+ geometry_location, layer_id, layer_name, create_user_id, create_user_name,
+ style, status, center_point, dept_name, rule_type, range
+
+
+
+
+ INSERT INTO map_polygon (
+ name, type, dept_id, address, remark,
+ geometry_location, layer_id, layer_name, create_user_id, create_user_name,
+ style, status, center_point, dept_name, rule_type, range
+ ) VALUES (
+ #{name}, #{type}, #{deptId}, #{address}, #{remark},
+ ST_GeomFromText(#{geometryLocation}), #{layerId}, #{layerName}, #{createUserId}, #{createUserName},
+ #{style}, #{status}, #{centerPoint}, #{deptName}, #{ruleType}, #{range}
+ )
+
+
+
+
+ UPDATE map_polygon
+
+ name = #{name},
+ type = #{type},
+ dept_id = #{deptId},
+ address = #{address},
+ remark = #{remark},
+ geometry_location = ST_GeomFromText(#{geometryLocation}),
+ layer_id = #{layerId},
+ layer_name = #{layerName},
+ create_user_id = #{createUserId},
+ create_user_name = #{createUserName},
+ style = #{style},
+ status = #{status},
+ center_point = #{centerPoint},
+ dept_name = #{deptName},
+ rule_type = #{ruleType},
+ range = #{range},
+
+ WHERE id = #{id}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/stwzhj-visual/stwzhj-nacos/src/main/resources/application.properties b/stwzhj-visual/stwzhj-nacos/src/main/resources/application.properties
index 72a9c9e5..4177209d 100644
--- a/stwzhj-visual/stwzhj-nacos/src/main/resources/application.properties
+++ b/stwzhj-visual/stwzhj-nacos/src/main/resources/application.properties
@@ -30,7 +30,7 @@ server.port=8848
### Specify local server's IP:
# nacos.inetutils.ip-address=
-spring.application.name=ruoyi-nacos
+spring.application.name=rhtx-nacos
#*************** Config Module Related Configurations ***************#
### Deprecated configuration property, it is recommended to use `spring.sql.init.platform` replaced.
# spring.datasource.platform=mysql
@@ -87,7 +87,7 @@ nacos.naming.empty-service.clean.period-time-ms=30000
#*************** Metrics Related Configurations ***************#
# 指向 ruoyi-monitor 监控
spring.boot.admin.client.url=http://127.0.0.1:9100
-spring.boot.admin.client.username=ruoyi
+spring.boot.admin.client.username=rhtx
spring.boot.admin.client.password=123456
spring.boot.admin.client.instance.service-host-type=IP
@@ -111,13 +111,14 @@ management.metrics.export.influx.enabled=false
#spring.security.enabled=false
### The ignore urls of auth, is deprecated in 1.2.0:
-nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
+#nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
+nacos.security.ignore.urls=/**
### The auth system to use, currently only 'nacos' and 'ldap' is supported:
nacos.core.auth.system.type=nacos
### If turn on auth system:
-nacos.core.auth.enabled=true
+nacos.core.auth.enabled=false
### Turn on/off caching of auth information. By turning on this switch, the update of auth information would have a 15 seconds delay.
nacos.core.auth.caching.enabled=true
@@ -127,9 +128,9 @@ nacos.core.auth.enable.userAgentAuthWhite=false
### Since 1.4.1, worked when nacos.core.auth.enabled=true and nacos.core.auth.enable.userAgentAuthWhite=false.
### The two properties is the white list for auth and used by identity the request from other server.
-### 此处为用户名密码 需要自行修改
-nacos.core.auth.server.identity.key=serverIdentity
-nacos.core.auth.server.identity.value=security
+### 此处为用户名密码 需要自行修改 此处设置无密码
+#nacos.core.auth.server.identity.key=serverIdentity
+#nacos.core.auth.server.identity.value=security
### worked when nacos.core.auth.system.type=nacos
### The token expiration in seconds:
@@ -137,8 +138,8 @@ nacos.core.auth.plugin.nacos.token.cache.enable=false
nacos.core.auth.plugin.nacos.token.expire.seconds=18000
### The default token (Base64 string):
#nacos.core.auth.plugin.nacos.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
-### 此处为token密钥 需要自行修改
-nacos.core.auth.plugin.nacos.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
+### 此处为token密钥 需要自行修改 此处设置无密码
+#nacos.core.auth.plugin.nacos.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
### worked when nacos.core.auth.system.type=ldap,{0} is Placeholder,replace login username
#nacos.core.auth.ldap.url=ldap://localhost:389
diff --git a/stwzhj-visual/stwzhj-nacos/src/main/resources/static/index.html b/stwzhj-visual/stwzhj-nacos/src/main/resources/static/index.html
index b5d23e5e..a78a2ae7 100644
--- a/stwzhj-visual/stwzhj-nacos/src/main/resources/static/index.html
+++ b/stwzhj-visual/stwzhj-nacos/src/main/resources/static/index.html
@@ -25,7 +25,7 @@
- Nacos
+ 数据服务中心
diff --git a/stwzhj-visual/stwzhj-sentinel-dashboard/src/main/resources/application.yml b/stwzhj-visual/stwzhj-sentinel-dashboard/src/main/resources/application.yml
index 9ae2e003..f79d1eea 100644
--- a/stwzhj-visual/stwzhj-sentinel-dashboard/src/main/resources/application.yml
+++ b/stwzhj-visual/stwzhj-sentinel-dashboard/src/main/resources/application.yml
@@ -6,7 +6,7 @@ server:
spring:
application:
# 应用名称
- name: ruoyi-sentinel-dashboard
+ name: wzhj-sentinel-dashboard
profiles:
# 环境配置
active: @profiles.active@
diff --git a/stwzhj-visual/stwzhj-sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/header/header.html b/stwzhj-visual/stwzhj-sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/header/header.html
index b72294da..b2bc5119 100644
--- a/stwzhj-visual/stwzhj-sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/header/header.html
+++ b/stwzhj-visual/stwzhj-sentinel-dashboard/src/main/webapp/resources/app/scripts/directives/header/header.html
@@ -1,13 +1,10 @@
-
\ No newline at end of file
+
diff --git a/stwzhj-visual/stwzhj-sentinel-dashboard/src/main/webapp/resources/app/views/dashboard/home.html b/stwzhj-visual/stwzhj-sentinel-dashboard/src/main/webapp/resources/app/views/dashboard/home.html
index 9a81bf5b..579878cb 100644
--- a/stwzhj-visual/stwzhj-sentinel-dashboard/src/main/webapp/resources/app/views/dashboard/home.html
+++ b/stwzhj-visual/stwzhj-sentinel-dashboard/src/main/webapp/resources/app/views/dashboard/home.html
@@ -1,7 +1,7 @@