From 33f09d7747df2d45736999e8e6a367a98840e3bc Mon Sep 17 00:00:00 2001 From: Live <1005297262@qq.com> Date: Tue, 9 Jun 2020 11:33:09 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E7=94=9F=E6=88=90domain=20=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E6=98=AF=E6=B5=AE=E7=82=B9=E5=9E=8B=20=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E7=94=A8BigDecimal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/project/tool/gen/util/GenUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java index 047cd2d5..29a840dd 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java +++ b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java @@ -58,11 +58,11 @@ public class GenUtils { column.setHtmlType(GenConstants.HTML_INPUT); - // 如果是浮点型 + // 如果是浮点型 统一用BigDecimal String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ","); if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0) { - column.setJavaType(GenConstants.TYPE_DOUBLE); + column.setJavaType(GenConstants.TYPE_BIGDECIMAL); } // 如果是整形 else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10) From 19b868875992821a28f408cbbd2a31fa47f91072 Mon Sep 17 00:00:00 2001 From: Live <1005297262@qq.com> Date: Tue, 9 Jun 2020 11:36:10 +0800 Subject: [PATCH 2/5] =?UTF-8?q?IpUtils=E5=B7=A5=E5=85=B7=EF=BC=8C=E6=B8=85?= =?UTF-8?q?=E9=99=A4Xss=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6=EF=BC=8C?= =?UTF-8?q?=E9=98=B2=E6=AD=A2Xff=E6=B3=A8=E5=85=A5=E6=94=BB=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java b/ruoyi/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java index 9e050e9f..5aa15dfe 100644 --- a/ruoyi/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java +++ b/ruoyi/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java @@ -40,7 +40,7 @@ public class IpUtils { ip = request.getRemoteAddr(); } - + ip = EscapeUtil.clean(ip);//清除Xss特殊字符 return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip; } From 0c069a57ccb294b7fbffd6e9d43c7a7f93394da3 Mon Sep 17 00:00:00 2001 From: Live <1005297262@qq.com> Date: Tue, 9 Jun 2020 11:37:39 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=B7=BB=E5=8A=A0robots.?= =?UTF-8?q?txt=20=E9=98=B2=E6=AD=A2=E5=90=8E=E5=8F=B0=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=A2=AB=E6=90=9C=E7=B4=A2=E5=BC=95=E6=93=8E?= =?UTF-8?q?=E6=94=B6=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/vue.config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 963a8238..b7f16f3e 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -117,7 +117,11 @@ module.exports = { } } }) - config.optimization.runtimeChunk('single') + config.optimization.runtimeChunk('single'), + { + from: path.resolve(__dirname, './public/robots.txt'),//防爬虫文件 + to:'./',//到根目录下 + } } ) } From a2d1160205170808553f5cee41c47cddebecf20c Mon Sep 17 00:00:00 2001 From: Live <1005297262@qq.com> Date: Tue, 9 Jun 2020 11:38:16 +0800 Subject: [PATCH 4/5] =?UTF-8?q?add=20ruoyi-ui/public/robots.txt.=20?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=B7=BB=E5=8A=A0robots.txt=20=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E5=90=8E=E5=8F=B0=E7=AE=A1=E7=90=86=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E8=A2=AB=E6=90=9C=E7=B4=A2=E5=BC=95=E6=93=8E=E6=94=B6=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/public/robots.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ruoyi-ui/public/robots.txt diff --git a/ruoyi-ui/public/robots.txt b/ruoyi-ui/public/robots.txt new file mode 100644 index 00000000..c2aab7e0 --- /dev/null +++ b/ruoyi-ui/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / \ No newline at end of file From 2daf89e0c68442594ddde3500eb40a4d40541bc6 Mon Sep 17 00:00:00 2001 From: Live <1005297262@qq.com> Date: Wed, 10 Jun 2020 18:30:17 +0800 Subject: [PATCH 5/5] =?UTF-8?q?HttpUtils.sendPost()=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E5=8F=82=E6=95=B0=E6=97=A0=E9=9C=80=E6=8B=BC=E6=8E=A5?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=88=B0url,=E5=90=A6=E5=88=99=E4=BC=9A?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E5=8F=8C=E4=BB=BD=E5=8F=82=E6=95=B0=20?= =?UTF-8?q?=E8=AF=B7=E6=B1=82url=E6=88=96form=E5=8F=82=E6=95=B0=20?= =?UTF-8?q?=E4=BC=9A=E5=87=BA=E7=8E=B0=E5=8F=8C=E4=BB=BD=E5=8F=82=E6=95=B0?= =?UTF-8?q?,=E5=B9=B6=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96=20{"token":["xxx?= =?UTF-8?q?xxxx","xxxxxxx"],"payType":["weixin","weixin"],"amount":["100",?= =?UTF-8?q?"100"],"orderId":["123","123"]}?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java b/ruoyi/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java index 20782404..5e92cde8 100644 --- a/ruoyi/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java +++ b/ruoyi/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java @@ -118,7 +118,7 @@ public class HttpUtils StringBuilder result = new StringBuilder(); try { - String urlNameString = url + "?" + param; + String urlNameString = url; log.info("sendPost - {}", urlNameString); URL realUrl = new URL(urlNameString); URLConnection conn = realUrl.openConnection();