From 45ced459c7985a385a631cadcb506e42b9433fa8 Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Mon, 13 Jul 2020 19:03:12 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-dev.yml | 64 +++++++++++++------ ...tion-test.yml => application-test.yml-bak} | 0 .../src/main/resources/application-dev.yml | 58 ++++++++++++----- ...tion-test.yml => application-test.yml-bak} | 0 .../src/main/resources/application-dev.yml | 58 ++++++++++++----- ...tion-test.yml => application-test.yml-bak} | 0 .../src/main/resources/application-dev.yml | 64 +++++++++++++------ ...tion-test.yml => application-test.yml-bak} | 0 .../src/main/resources/application-dev.yml | 59 ++++++++++++----- ...tion-test.yml => application-test.yml-bak} | 0 .../src/main/resources/application-dev.yml | 58 ++++++++++++----- ...tion-test.yml => application-test.yml-bak} | 0 .../src/main/resources/application-dev.yml | 58 ++++++++++++----- ...tion-test.yml => application-test.yml-bak} | 0 .../src/main/resources/application-dev.yml | 60 +++++++++++------ ...tion-test.yml => application-test.yml-bak} | 0 .../src/main/resources/application-dev.yml | 58 ++++++++++++----- ...tion-test.yml => application-test.yml-bak} | 0 18 files changed, 377 insertions(+), 160 deletions(-) rename mallinkAdmin/src/main/resources/{application-test.yml => application-test.yml-bak} (100%) rename mallinkBApi/src/main/resources/{application-test.yml => application-test.yml-bak} (100%) rename mallinkCApi/src/main/resources/{application-test.yml => application-test.yml-bak} (100%) rename mallinkCallback/src/main/resources/{application-test.yml => application-test.yml-bak} (100%) rename mallinkMQConsumer/src/main/resources/{application-test.yml => application-test.yml-bak} (100%) rename mallinkPosApi/src/main/resources/{application-test.yml => application-test.yml-bak} (100%) rename mallinkSchedule/src/main/resources/{application-test.yml => application-test.yml-bak} (100%) rename mallinkSysAdmin/src/main/resources/{application-test.yml => application-test.yml-bak} (100%) rename mallinkWebSocketServer/src/main/resources/{application-test.yml => application-test.yml-bak} (100%) diff --git a/mallinkAdmin/src/main/resources/application-dev.yml b/mallinkAdmin/src/main/resources/application-dev.yml index c8195e0ad..b70f43f41 100644 --- a/mallinkAdmin/src/main/resources/application-dev.yml +++ b/mallinkAdmin/src/main/resources/application-dev.yml @@ -1,13 +1,12 @@ spring: profiles: - include: aliyunRocketMQ - #include: rabbitMQ + #include: aliyunRocketMQ + include: rabbitMQ # JDBC datasource: - #url: jdbc:mysql://rm-2zel9i9t555zy7lftmo.mysql.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true&allowMultiQueries=true - url: jdbc:mysql://zc349w82qvn56ftl5e64-rw4rm.rwlb.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true&allowMultiQueries=true - username: ENC(dZ8fmrtuBMQYaRytKQgTqg==) - password: ENC(IKH7HxMZwIqMttMc9+QsqWa1KMsJvTs4) + url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true&allowMultiQueries=true + username: root + password: fm2020test type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver filters: stat @@ -28,9 +27,9 @@ spring: #date-format: yyyy-MM-dd HH:mm:ss # REDIS redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 5 @@ -90,8 +89,8 @@ spring: rabbitmq: host: 202.165.179.86 port: 5672 - username: ENC(2f9Nqt3c4cbVGYnhpjp9Mg==) - password: ENC(2av0JfMfz141IHkG6ibI8aKzmD33bc64wcN/O43ucbo=) + username: fumao + password: f9l98&*%%u7flt33 publisher-confirms: true publisher-returns: false virtual-host: / @@ -109,20 +108,45 @@ aws: access: ENC(3gx5ghDFBqGrEhO3Wf8aYmXsnwHO7Cj3HNKJGOeUj0o=) secret: ENC(HVKIJwCJKVXLlUpGlQPwNqJOlnpxn4xYuy91SH0seTSm2uAttIQHvA49fXWWax90v5wloIk0QuU=) +#wechat: +# web: +# appId: "wxe31beafbfd8295ba" +# secret: "c689fabf3c4c9f5b6424ff2a36a26727" +# url: "https://mall.youlane.cn" +# open: +# componentAppId: "wx897e4673286c915d" +# componentSecret: "cdfdfda65c45689beb6766c4c427eed2" +# componentToken: "formall2018" +# componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" +# redis: +# host: 202.165.179.86 +# port: 6379 +# password: iF0rm@2l2ol9 +# timeout: 3600 +# expire: 1800 #30分钟 +# database: 2 +# defaultExpiration: 2592000 # 默认生命周期30天 +# jedis: +# pool: +# max-active: 100 +# max-idle: 500 +# max-wait: -1 +# min-idle: 10 + wechat: web: - appId: "wxe31beafbfd8295ba" - secret: "c689fabf3c4c9f5b6424ff2a36a26727" - url: "https://mall.youlane.cn" + appId: "wx091907dd0bfd3f6b" + secret: "2a2ca10738998b9ef92c1fe8a4d366a6" + url: "https://admintest.malls.iformall.com" open: - componentAppId: "wx897e4673286c915d" - componentSecret: "cdfdfda65c45689beb6766c4c427eed2" - componentToken: "formall2018" - componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" + componentAppId: wxdfc8fb4e62d6b52b + componentSecret: 98daa62b316dd6feabaad708327ce233 + componentToken: formall2018 + componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 2 @@ -130,7 +154,7 @@ wechat: jedis: pool: max-active: 100 - max-idle: 500 + max-idle: 100 max-wait: -1 min-idle: 10 diff --git a/mallinkAdmin/src/main/resources/application-test.yml b/mallinkAdmin/src/main/resources/application-test.yml-bak similarity index 100% rename from mallinkAdmin/src/main/resources/application-test.yml rename to mallinkAdmin/src/main/resources/application-test.yml-bak diff --git a/mallinkBApi/src/main/resources/application-dev.yml b/mallinkBApi/src/main/resources/application-dev.yml index e34037bc7..53589c006 100644 --- a/mallinkBApi/src/main/resources/application-dev.yml +++ b/mallinkBApi/src/main/resources/application-dev.yml @@ -1,13 +1,12 @@ spring: profiles: - include: aliyunRocketMQ - #include: rabbitMQ + #include: aliyunRocketMQ + include: rabbitMQ # JDBC datasource: - #url: jdbc:mysql://rm-2zel9i9t555zy7lftmo.mysql.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - url: jdbc:mysql://zc349w82qvn56ftl5e64-rw4rm.rwlb.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - username: ENC(dZ8fmrtuBMQYaRytKQgTqg==) - password: ENC(IKH7HxMZwIqMttMc9+QsqWa1KMsJvTs4) + url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true + username: root + password: fm2020test type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver filters: stat @@ -27,9 +26,9 @@ spring: #date-format: yyyy-MM-dd HH:mm:ss # REDIS redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 5 @@ -88,8 +87,8 @@ spring: rabbitmq: host: 202.165.179.86 port: 5672 - username: ENC(2f9Nqt3c4cbVGYnhpjp9Mg==) - password: ENC(2av0JfMfz141IHkG6ibI8aKzmD33bc64wcN/O43ucbo=) + username: fumao + password: f9l98&*%%u7flt33 publisher-confirms: true publisher-returns: false virtual-host: / @@ -109,16 +108,41 @@ jasypt: encryptor: password: oRqdnDbK5pj3eMmB +#wechat: +# open: +# componentAppId: "wxdfc8fb4e62d6b52b" +# componentSecret: "98daa62b316dd6feabaad708327ce233" +# componentToken: "formall2018" +# componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" +# redis: +# host: 101.201.103.81 +# port: 6379 +# password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) +# timeout: 3600 +# expire: 1800 #30分钟 +# database: 2 +# defaultExpiration: 2592000 # 默认生命周期30天 +# jedis: +# pool: +# max-active: 100 +# max-idle: 500 +# max-wait: -1 +# min-idle: 10 + wechat: + web: + appId: "wx091907dd0bfd3f6b" + secret: "2a2ca10738998b9ef92c1fe8a4d366a6" + url: "https://admintest.malls.iformall.com" open: - componentAppId: "wxdfc8fb4e62d6b52b" - componentSecret: "98daa62b316dd6feabaad708327ce233" - componentToken: "formall2018" - componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" + componentAppId: wxdfc8fb4e62d6b52b + componentSecret: 98daa62b316dd6feabaad708327ce233 + componentToken: formall2018 + componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 2 @@ -126,7 +150,7 @@ wechat: jedis: pool: max-active: 100 - max-idle: 500 + max-idle: 100 max-wait: -1 min-idle: 10 diff --git a/mallinkBApi/src/main/resources/application-test.yml b/mallinkBApi/src/main/resources/application-test.yml-bak similarity index 100% rename from mallinkBApi/src/main/resources/application-test.yml rename to mallinkBApi/src/main/resources/application-test.yml-bak diff --git a/mallinkCApi/src/main/resources/application-dev.yml b/mallinkCApi/src/main/resources/application-dev.yml index 7307d0404..9ec032bba 100644 --- a/mallinkCApi/src/main/resources/application-dev.yml +++ b/mallinkCApi/src/main/resources/application-dev.yml @@ -1,13 +1,12 @@ spring: profiles: - include: aliyunRocketMQ - #include: rabbitMQ + #include: aliyunRocketMQ + include: rabbitMQ # JDBC datasource: - #url: jdbc:mysql://rm-2zel9i9t555zy7lftmo.mysql.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - url: jdbc:mysql://zc349w82qvn56ftl5e64-rw4rm.rwlb.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - username: ENC(dZ8fmrtuBMQYaRytKQgTqg==) - password: ENC(IKH7HxMZwIqMttMc9+QsqWa1KMsJvTs4) + url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true + username: root + password: fm2020test type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver filters: stat @@ -28,9 +27,9 @@ spring: # REDIS redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 5 @@ -88,8 +87,8 @@ spring: rabbitmq: host: 202.165.179.86 port: 5672 - username: ENC(2f9Nqt3c4cbVGYnhpjp9Mg==) - password: ENC(2av0JfMfz141IHkG6ibI8aKzmD33bc64wcN/O43ucbo=) + username: fumao + password: f9l98&*%%u7flt33 publisher-confirms: true publisher-returns: false virtual-host: / @@ -105,16 +104,41 @@ aws: access: ENC(3gx5ghDFBqGrEhO3Wf8aYmXsnwHO7Cj3HNKJGOeUj0o=) secret: ENC(HVKIJwCJKVXLlUpGlQPwNqJOlnpxn4xYuy91SH0seTSm2uAttIQHvA49fXWWax90v5wloIk0QuU=) +#wechat: +# open: +# componentAppId: "wxdfc8fb4e62d6b52b" +# componentSecret: "98daa62b316dd6feabaad708327ce233" +# componentToken: "formall2018" +# componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" +# redis: +# host: 101.201.103.81 +# port: 6379 +# password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) +# timeout: 3600 +# expire: 1800 #30分钟 +# database: 2 +# defaultExpiration: 2592000 # 默认生命周期30天 +# jedis: +# pool: +# max-active: 100 +# max-idle: 500 +# max-wait: -1 +# min-idle: 10 + wechat: + web: + appId: "wx091907dd0bfd3f6b" + secret: "2a2ca10738998b9ef92c1fe8a4d366a6" + url: "https://admintest.malls.iformall.com" open: - componentAppId: "wxdfc8fb4e62d6b52b" - componentSecret: "98daa62b316dd6feabaad708327ce233" - componentToken: "formall2018" - componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" + componentAppId: wxdfc8fb4e62d6b52b + componentSecret: 98daa62b316dd6feabaad708327ce233 + componentToken: formall2018 + componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 2 @@ -122,7 +146,7 @@ wechat: jedis: pool: max-active: 100 - max-idle: 500 + max-idle: 100 max-wait: -1 min-idle: 10 diff --git a/mallinkCApi/src/main/resources/application-test.yml b/mallinkCApi/src/main/resources/application-test.yml-bak similarity index 100% rename from mallinkCApi/src/main/resources/application-test.yml rename to mallinkCApi/src/main/resources/application-test.yml-bak diff --git a/mallinkCallback/src/main/resources/application-dev.yml b/mallinkCallback/src/main/resources/application-dev.yml index 1bfa02852..c2de357bd 100644 --- a/mallinkCallback/src/main/resources/application-dev.yml +++ b/mallinkCallback/src/main/resources/application-dev.yml @@ -1,13 +1,12 @@ spring: profiles: - include: aliyunRocketMQ - #include: rabbitMQ + #include: aliyunRocketMQ + include: rabbitMQ # JDBC datasource: - #url: jdbc:mysql://rm-2zel9i9t555zy7lftmo.mysql.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - url: jdbc:mysql://zc349w82qvn56ftl5e64-rw4rm.rwlb.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - username: ENC(dZ8fmrtuBMQYaRytKQgTqg==) - password: ENC(IKH7HxMZwIqMttMc9+QsqWa1KMsJvTs4) + url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true + username: root + password: fm2020test type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver filters: stat @@ -28,9 +27,9 @@ spring: #date-format: yyyy-MM-dd HH:mm:ss # REDIS redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 5 @@ -89,8 +88,8 @@ spring: rabbitmq: host: 202.165.179.86 port: 5672 - username: ENC(2f9Nqt3c4cbVGYnhpjp9Mg==) - password: ENC(2av0JfMfz141IHkG6ibI8aKzmD33bc64wcN/O43ucbo=) + username: fumao + password: f9l98&*%%u7flt33 publisher-confirms: true publisher-returns: false virtual-host: / @@ -107,20 +106,45 @@ aws: access: ENC(3gx5ghDFBqGrEhO3Wf8aYmXsnwHO7Cj3HNKJGOeUj0o=) secret: ENC(HVKIJwCJKVXLlUpGlQPwNqJOlnpxn4xYuy91SH0seTSm2uAttIQHvA49fXWWax90v5wloIk0QuU=) +#wechat: +# web: +# appId: "wxe31beafbfd8295ba" +# secret: "c689fabf3c4c9f5b6424ff2a36a26727" +# url: "https://mall.youlane.cn" +# open: +# componentAppId: "wx897e4673286c915d" +# componentSecret: "cdfdfda65c45689beb6766c4c427eed2" +# componentToken: "formall2018" +# componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" +# redis: +# host: 101.201.103.81 +# port: 6379 +# password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) +# timeout: 3600 +# expire: 1800 #30分钟 +# database: 2 +# defaultExpiration: 2592000 # 默认生命周期30天 +# jedis: +# pool: +# max-active: 100 +# max-idle: 500 +# max-wait: -1 +# min-idle: 10 + wechat: web: - appId: "wxe31beafbfd8295ba" - secret: "c689fabf3c4c9f5b6424ff2a36a26727" - url: "https://mall.youlane.cn" + appId: "wx091907dd0bfd3f6b" + secret: "2a2ca10738998b9ef92c1fe8a4d366a6" + url: "https://admintest.malls.iformall.com" open: - componentAppId: "wx897e4673286c915d" - componentSecret: "cdfdfda65c45689beb6766c4c427eed2" - componentToken: "formall2018" - componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" + componentAppId: wxdfc8fb4e62d6b52b + componentSecret: 98daa62b316dd6feabaad708327ce233 + componentToken: formall2018 + componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 2 @@ -128,7 +152,7 @@ wechat: jedis: pool: max-active: 100 - max-idle: 500 + max-idle: 100 max-wait: -1 min-idle: 10 diff --git a/mallinkCallback/src/main/resources/application-test.yml b/mallinkCallback/src/main/resources/application-test.yml-bak similarity index 100% rename from mallinkCallback/src/main/resources/application-test.yml rename to mallinkCallback/src/main/resources/application-test.yml-bak diff --git a/mallinkMQConsumer/src/main/resources/application-dev.yml b/mallinkMQConsumer/src/main/resources/application-dev.yml index 46adaa728..96f2a28b6 100644 --- a/mallinkMQConsumer/src/main/resources/application-dev.yml +++ b/mallinkMQConsumer/src/main/resources/application-dev.yml @@ -1,13 +1,12 @@ spring: profiles: - include: aliyunRocketMQ - #include: rabbitMQ + #include: aliyunRocketMQ + include: rabbitMQ # JDBC datasource: - #url: jdbc:mysql://rm-2zel9i9t555zy7lftmo.mysql.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - url: jdbc:mysql://zc349w82qvn56ftl5e64-rw4rm.rwlb.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - username: ENC(dZ8fmrtuBMQYaRytKQgTqg==) - password: ENC(IKH7HxMZwIqMttMc9+QsqWa1KMsJvTs4) + url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true + username: root + password: fm2020test type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver filters: stat @@ -29,9 +28,9 @@ spring: # REDIS redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 5 @@ -88,8 +87,8 @@ spring: rabbitmq: host: 202.165.179.86 port: 5672 - username: ENC(2f9Nqt3c4cbVGYnhpjp9Mg==) - password: ENC(2av0JfMfz141IHkG6ibI8aKzmD33bc64wcN/O43ucbo=) + username: fumao + password: f9l98&*%%u7flt33 publisher-confirms: true publisher-returns: false virtual-host: / @@ -105,16 +104,41 @@ aws: access: ENC(3gx5ghDFBqGrEhO3Wf8aYmXsnwHO7Cj3HNKJGOeUj0o=) secret: ENC(HVKIJwCJKVXLlUpGlQPwNqJOlnpxn4xYuy91SH0seTSm2uAttIQHvA49fXWWax90v5wloIk0QuU=) +#wechat: +# open: +# componentAppId: "wxdfc8fb4e62d6b52b" +# componentSecret: "98daa62b316dd6feabaad708327ce233" +# componentToken: "formall2018" +# componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" +# redis: +# host: 101.201.103.81 +# port: 6379 +# password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) +# timeout: 3600 +# expire: 1800 #30分钟 +# database: 2 +# defaultExpiration: 2592000 # 默认生命周期30天 +# jedis: +# pool: +# max-active: 100 +# max-idle: 500 +# max-wait: -1 +# min-idle: 10 + wechat: + web: + appId: "wx091907dd0bfd3f6b" + secret: "2a2ca10738998b9ef92c1fe8a4d366a6" + url: "https://admintest.malls.iformall.com" open: - componentAppId: "wxdfc8fb4e62d6b52b" - componentSecret: "98daa62b316dd6feabaad708327ce233" - componentToken: "formall2018" - componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" + componentAppId: wxdfc8fb4e62d6b52b + componentSecret: 98daa62b316dd6feabaad708327ce233 + componentToken: formall2018 + componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 2 @@ -122,10 +146,11 @@ wechat: jedis: pool: max-active: 100 - max-idle: 500 + max-idle: 100 max-wait: -1 min-idle: 10 + jasypt: encryptor: password: oRqdnDbK5pj3eMmB diff --git a/mallinkMQConsumer/src/main/resources/application-test.yml b/mallinkMQConsumer/src/main/resources/application-test.yml-bak similarity index 100% rename from mallinkMQConsumer/src/main/resources/application-test.yml rename to mallinkMQConsumer/src/main/resources/application-test.yml-bak diff --git a/mallinkPosApi/src/main/resources/application-dev.yml b/mallinkPosApi/src/main/resources/application-dev.yml index 119bbf5f1..cb1c954bf 100644 --- a/mallinkPosApi/src/main/resources/application-dev.yml +++ b/mallinkPosApi/src/main/resources/application-dev.yml @@ -1,13 +1,12 @@ spring: profiles: - include: aliyunRocketMQ - #include: rabbitMQ + #include: aliyunRocketMQ + include: rabbitMQ # JDBC datasource: - #url: jdbc:mysql://rm-2zel9i9t555zy7lftmo.mysql.rds.aliyuncs.com:3306/mallinkDevGroup1?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - url: jdbc:mysql://zc349w82qvn56ftl5e64-rw4rm.rwlb.rds.aliyuncs.com:3306/mallinkDevGroup1?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - username: ENC(dZ8fmrtuBMQYaRytKQgTqg==) - password: ENC(IKH7HxMZwIqMttMc9+QsqWa1KMsJvTs4) + url: jdbc:mysql://202.165.179.86:3306/mallinkDevGroup1?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true + username: root + password: fm2020test type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver filters: stat @@ -27,9 +26,9 @@ spring: #date-format: yyyy-MM-dd HH:mm:ss # REDIS redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 5 @@ -88,8 +87,8 @@ spring: rabbitmq: host: 202.165.179.86 port: 5672 - username: ENC(2f9Nqt3c4cbVGYnhpjp9Mg==) - password: ENC(2av0JfMfz141IHkG6ibI8aKzmD33bc64wcN/O43ucbo=) + username: fumao + password: f9l98&*%%u7flt33 publisher-confirms: true publisher-returns: false virtual-host: / @@ -109,16 +108,41 @@ jasypt: encryptor: password: oRqdnDbK5pj3eMmB +#wechat: +# open: +# componentAppId: "wxdfc8fb4e62d6b52b" +# componentSecret: "98daa62b316dd6feabaad708327ce233" +# componentToken: "formall2018" +# componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" +# redis: +# host: 101.201.103.81 +# port: 6379 +# password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) +# timeout: 3600 +# expire: 1800 #30分钟 +# database: 2 +# defaultExpiration: 2592000 # 默认生命周期30天 +# jedis: +# pool: +# max-active: 100 +# max-idle: 500 +# max-wait: -1 +# min-idle: 10 + wechat: + web: + appId: "wx091907dd0bfd3f6b" + secret: "2a2ca10738998b9ef92c1fe8a4d366a6" + url: "https://admintest.malls.iformall.com" open: - componentAppId: "wxdfc8fb4e62d6b52b" - componentSecret: "98daa62b316dd6feabaad708327ce233" - componentToken: "formall2018" - componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" + componentAppId: wxdfc8fb4e62d6b52b + componentSecret: 98daa62b316dd6feabaad708327ce233 + componentToken: formall2018 + componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 2 @@ -126,7 +150,7 @@ wechat: jedis: pool: max-active: 100 - max-idle: 500 + max-idle: 100 max-wait: -1 min-idle: 10 diff --git a/mallinkPosApi/src/main/resources/application-test.yml b/mallinkPosApi/src/main/resources/application-test.yml-bak similarity index 100% rename from mallinkPosApi/src/main/resources/application-test.yml rename to mallinkPosApi/src/main/resources/application-test.yml-bak diff --git a/mallinkSchedule/src/main/resources/application-dev.yml b/mallinkSchedule/src/main/resources/application-dev.yml index 9692540ff..298c01a4c 100644 --- a/mallinkSchedule/src/main/resources/application-dev.yml +++ b/mallinkSchedule/src/main/resources/application-dev.yml @@ -1,13 +1,12 @@ spring: profiles: - include: aliyunRocketMQ - #include: rabbitMQ + #include: aliyunRocketMQ + include: rabbitMQ # JDBC datasource: - #url: jdbc:mysql://rm-2zel9i9t555zy7lftmo.mysql.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - url: jdbc:mysql://zc349w82qvn56ftl5e64-rw4rm.rwlb.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - username: ENC(dZ8fmrtuBMQYaRytKQgTqg==) - password: ENC(IKH7HxMZwIqMttMc9+QsqWa1KMsJvTs4) + url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true + username: root + password: fm2020test type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver filters: stat @@ -29,9 +28,9 @@ spring: # REDIS redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 5 @@ -88,8 +87,8 @@ spring: rabbitmq: host: 202.165.179.86 port: 5672 - username: ENC(2f9Nqt3c4cbVGYnhpjp9Mg==) - password: ENC(2av0JfMfz141IHkG6ibI8aKzmD33bc64wcN/O43ucbo=) + username: fumao + password: f9l98&*%%u7flt33 publisher-confirms: true publisher-returns: false virtual-host: / @@ -105,16 +104,41 @@ aws: access: ENC(3gx5ghDFBqGrEhO3Wf8aYmXsnwHO7Cj3HNKJGOeUj0o=) secret: ENC(HVKIJwCJKVXLlUpGlQPwNqJOlnpxn4xYuy91SH0seTSm2uAttIQHvA49fXWWax90v5wloIk0QuU=) +#wechat: +# open: +# componentAppId: "wxdfc8fb4e62d6b52b" +# componentSecret: "98daa62b316dd6feabaad708327ce233" +# componentToken: "formall2018" +# componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" +# redis: +# host: 101.201.103.81 +# port: 6379 +# password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) +# timeout: 3600 +# expire: 1800 #30分钟 +# database: 2 +# defaultExpiration: 2592000 # 默认生命周期30天 +# jedis: +# pool: +# max-active: 100 +# max-idle: 500 +# max-wait: -1 +# min-idle: 10 + wechat: + web: + appId: "wx091907dd0bfd3f6b" + secret: "2a2ca10738998b9ef92c1fe8a4d366a6" + url: "https://admintest.malls.iformall.com" open: - componentAppId: "wxdfc8fb4e62d6b52b" - componentSecret: "98daa62b316dd6feabaad708327ce233" - componentToken: "formall2018" - componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" + componentAppId: wxdfc8fb4e62d6b52b + componentSecret: 98daa62b316dd6feabaad708327ce233 + componentToken: formall2018 + componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 2 @@ -122,7 +146,7 @@ wechat: jedis: pool: max-active: 100 - max-idle: 500 + max-idle: 100 max-wait: -1 min-idle: 10 diff --git a/mallinkSchedule/src/main/resources/application-test.yml b/mallinkSchedule/src/main/resources/application-test.yml-bak similarity index 100% rename from mallinkSchedule/src/main/resources/application-test.yml rename to mallinkSchedule/src/main/resources/application-test.yml-bak diff --git a/mallinkSysAdmin/src/main/resources/application-dev.yml b/mallinkSysAdmin/src/main/resources/application-dev.yml index 3ac633170..d60c5cb09 100644 --- a/mallinkSysAdmin/src/main/resources/application-dev.yml +++ b/mallinkSysAdmin/src/main/resources/application-dev.yml @@ -3,10 +3,9 @@ spring: include: rabbitMQ # JDBC datasource: - #url: jdbc:mysql://rm-2zel9i9t555zy7lftmo.mysql.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - url: jdbc:mysql://zc349w82qvn56ftl5e64-rw4rm.rwlb.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - username: ENC(dZ8fmrtuBMQYaRytKQgTqg==) - password: ENC(IKH7HxMZwIqMttMc9+QsqWa1KMsJvTs4) + url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true + username: root + password: fm2020test type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver filters: stat @@ -29,7 +28,7 @@ spring: redis: host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 1 @@ -88,8 +87,8 @@ spring: rabbitmq: host: 202.165.179.86 port: 5672 - username: ENC(2f9Nqt3c4cbVGYnhpjp9Mg==) - password: ENC(2av0JfMfz141IHkG6ibI8aKzmD33bc64wcN/O43ucbo=) + username: fumao + password: f9l98&*%%u7flt33 publisher-confirms: true publisher-returns: false virtual-host: / @@ -102,28 +101,53 @@ aws: access: ENC(3gx5ghDFBqGrEhO3Wf8aYmXsnwHO7Cj3HNKJGOeUj0o=) secret: ENC(HVKIJwCJKVXLlUpGlQPwNqJOlnpxn4xYuy91SH0seTSm2uAttIQHvA49fXWWax90v5wloIk0QuU=) +#wechat: +# web: +# appId: "wxe31beafbfd8295ba" +# secret: "c689fabf3c4c9f5b6424ff2a36a26727" +# url: "https://mall.youlane.cn" +# open: +# componentAppId: "wxdfc8fb4e62d6b52b" +# componentSecret: "98daa62b316dd6feabaad708327ce233" +# componentToken: "formall2018" +# componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" +# redis: +# host: 101.201.103.81 +# port: 6379 +# password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) +# timeout: 3600 +# expire: 1800 #30分钟 +# database: 5 +# defaultExpiration: 2592000 # 默认生命周期30天 +# jedis: +# pool: +# max-active: 100 +# max-idle: 500 +# max-wait: -1 +# min-idle: 10 + wechat: web: - appId: "wxe31beafbfd8295ba" - secret: "c689fabf3c4c9f5b6424ff2a36a26727" - url: "https://mall.youlane.cn" + appId: "wx091907dd0bfd3f6b" + secret: "2a2ca10738998b9ef92c1fe8a4d366a6" + url: "https://admintest.malls.iformall.com" open: - componentAppId: "wxdfc8fb4e62d6b52b" - componentSecret: "98daa62b316dd6feabaad708327ce233" - componentToken: "formall2018" - componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" + componentAppId: wxdfc8fb4e62d6b52b + componentSecret: 98daa62b316dd6feabaad708327ce233 + componentToken: formall2018 + componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 - database: 5 + database: 2 defaultExpiration: 2592000 # 默认生命周期30天 jedis: pool: max-active: 100 - max-idle: 500 + max-idle: 100 max-wait: -1 min-idle: 10 diff --git a/mallinkSysAdmin/src/main/resources/application-test.yml b/mallinkSysAdmin/src/main/resources/application-test.yml-bak similarity index 100% rename from mallinkSysAdmin/src/main/resources/application-test.yml rename to mallinkSysAdmin/src/main/resources/application-test.yml-bak diff --git a/mallinkWebSocketServer/src/main/resources/application-dev.yml b/mallinkWebSocketServer/src/main/resources/application-dev.yml index 0e2f81464..cf96df06a 100644 --- a/mallinkWebSocketServer/src/main/resources/application-dev.yml +++ b/mallinkWebSocketServer/src/main/resources/application-dev.yml @@ -1,13 +1,12 @@ spring: profiles: - include: aliyunRocketMQ - #include: rabbitMQ + #include: aliyunRocketMQ + include: rabbitMQ # JDBC datasource: - #url: jdbc:mysql://rm-2zel9i9t555zy7lftmo.mysql.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - url: jdbc:mysql://zc349w82qvn56ftl5e64-rw4rm.rwlb.rds.aliyuncs.com:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true - username: ENC(dZ8fmrtuBMQYaRytKQgTqg==) - password: ENC(IKH7HxMZwIqMttMc9+QsqWa1KMsJvTs4) + url: jdbc:mysql://202.165.179.86:3306/mallink?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useUnicode=true&useSSL=false&useAffectedRows=true + username: root + password: fm2020test type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver filters: stat @@ -29,9 +28,9 @@ spring: # REDIS redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 5 @@ -88,8 +87,8 @@ spring: rabbitmq: host: 202.165.179.86 port: 5672 - username: ENC(2f9Nqt3c4cbVGYnhpjp9Mg==) - password: ENC(2av0JfMfz141IHkG6ibI8aKzmD33bc64wcN/O43ucbo=) + username: fumao + password: f9l98&*%%u7flt33 publisher-confirms: true publisher-returns: false virtual-host: / @@ -105,16 +104,41 @@ aws: access: ENC(3gx5ghDFBqGrEhO3Wf8aYmXsnwHO7Cj3HNKJGOeUj0o=) secret: ENC(HVKIJwCJKVXLlUpGlQPwNqJOlnpxn4xYuy91SH0seTSm2uAttIQHvA49fXWWax90v5wloIk0QuU=) +#wechat: +# open: +# componentAppId: "wxdfc8fb4e62d6b52b" +# componentSecret: "98daa62b316dd6feabaad708327ce233" +# componentToken: "formall2018" +# componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" +# redis: +# host: 101.201.103.81 +# port: 6379 +# password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) +# timeout: 3600 +# expire: 1800 #30分钟 +# database: 2 +# defaultExpiration: 2592000 # 默认生命周期30天 +# jedis: +# pool: +# max-active: 100 +# max-idle: 500 +# max-wait: -1 +# min-idle: 10 + wechat: + web: + appId: "wx091907dd0bfd3f6b" + secret: "2a2ca10738998b9ef92c1fe8a4d366a6" + url: "https://admintest.malls.iformall.com" open: - componentAppId: "wxdfc8fb4e62d6b52b" - componentSecret: "98daa62b316dd6feabaad708327ce233" - componentToken: "formall2018" - componentAesKey: "htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN" + componentAppId: wxdfc8fb4e62d6b52b + componentSecret: 98daa62b316dd6feabaad708327ce233 + componentToken: formall2018 + componentAesKey: htKq8EjBMPNndfZQK9JiFojFaqFwFpw42VfeWFtx7HN redis: - host: 101.201.103.81 + host: 202.165.179.86 port: 6379 - password: ENC(xPFDlgd6v8zUhJMbcKc0KmmQiqs9qHtk) + password: iF0rm@2l2ol9 timeout: 3600 expire: 1800 #30分钟 database: 2 @@ -122,7 +146,7 @@ wechat: jedis: pool: max-active: 100 - max-idle: 500 + max-idle: 100 max-wait: -1 min-idle: 10 diff --git a/mallinkWebSocketServer/src/main/resources/application-test.yml b/mallinkWebSocketServer/src/main/resources/application-test.yml-bak similarity index 100% rename from mallinkWebSocketServer/src/main/resources/application-test.yml rename to mallinkWebSocketServer/src/main/resources/application-test.yml-bak From 0a1fe0936d9b244ff00bdee5ce33ebe6b3f82937 Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Tue, 14 Jul 2020 17:18:15 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A4=84=E7=90=86=E9=9D=9Eweb=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E7=9A=84tenantId=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/NonWebRequestAttributes.java | 47 +++++++++++++++++++ .../iformall/common/TenantThreadLocal.java | 23 ++++++--- 2 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 mallinkService/src/main/java/com/iformall/common/NonWebRequestAttributes.java diff --git a/mallinkService/src/main/java/com/iformall/common/NonWebRequestAttributes.java b/mallinkService/src/main/java/com/iformall/common/NonWebRequestAttributes.java new file mode 100644 index 000000000..e9fc1d913 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/common/NonWebRequestAttributes.java @@ -0,0 +1,47 @@ +package com.iformall.common; + +import org.springframework.web.context.request.RequestAttributes; + +public class NonWebRequestAttributes implements RequestAttributes{ + + @Override + public Object getAttribute(String arg0, int arg1) { + return null; + } + + @Override + public String[] getAttributeNames(int arg0) { + return null; + } + + @Override + public String getSessionId() { + return null; + } + + @Override + public Object getSessionMutex() { + return null; + } + + @Override + public void registerDestructionCallback(String arg0, Runnable arg1, int arg2) { + + } + + @Override + public void removeAttribute(String arg0, int arg1) { + + } + + @Override + public Object resolveReference(String arg0) { + return null; + } + + @Override + public void setAttribute(String arg0, Object arg1, int arg2) { + + } + +} diff --git a/mallinkService/src/main/java/com/iformall/common/TenantThreadLocal.java b/mallinkService/src/main/java/com/iformall/common/TenantThreadLocal.java index 0e7c3e39b..8e1785ce9 100644 --- a/mallinkService/src/main/java/com/iformall/common/TenantThreadLocal.java +++ b/mallinkService/src/main/java/com/iformall/common/TenantThreadLocal.java @@ -9,27 +9,38 @@ public class TenantThreadLocal { //private static ThreadLocal parentLocal = new ThreadLocal(); public static void setCurrentThreadTenant(String tenantId,String parentId) { - RequestContextHolder.currentRequestAttributes().setAttribute("tenaneId", tenantId, RequestAttributes.SCOPE_REQUEST); - RequestContextHolder.currentRequestAttributes().setAttribute("parentTenaneId", parentId, RequestAttributes.SCOPE_REQUEST); + getRequestAttributesSafely().setAttribute("tenaneId", tenantId, RequestAttributes.SCOPE_REQUEST); + getRequestAttributesSafely().setAttribute("parentTenaneId", parentId, RequestAttributes.SCOPE_REQUEST); //local.set(tenantId); //parentLocal.set(parentId); } public static String getTenantId() { - return (String)RequestContextHolder.currentRequestAttributes().getAttribute("tenaneId", RequestAttributes.SCOPE_REQUEST); + return (String)getRequestAttributesSafely().getAttribute("tenaneId", RequestAttributes.SCOPE_REQUEST); //return local.get(); } public static String getParentTenantId() { - return (String)RequestContextHolder.currentRequestAttributes().getAttribute("parentTenaneId", RequestAttributes.SCOPE_REQUEST); + return (String)getRequestAttributesSafely().getAttribute("parentTenaneId", RequestAttributes.SCOPE_REQUEST); //return parentLocal.get(); } public static void remove() { - RequestContextHolder.currentRequestAttributes().removeAttribute("tenaneId", RequestAttributes.SCOPE_REQUEST); - RequestContextHolder.currentRequestAttributes().removeAttribute("parentTenaneId", RequestAttributes.SCOPE_REQUEST); + getRequestAttributesSafely().removeAttribute("tenaneId", RequestAttributes.SCOPE_REQUEST); + getRequestAttributesSafely().removeAttribute("parentTenaneId", RequestAttributes.SCOPE_REQUEST); //local.remove(); //parentLocal.remove(); } + //如果是非web的线程,则都为空 + public static RequestAttributes getRequestAttributesSafely(){ + RequestAttributes requestAttributes = null; + try{ + requestAttributes = RequestContextHolder.currentRequestAttributes(); + }catch (IllegalStateException e){ + requestAttributes = new NonWebRequestAttributes(); + } + return requestAttributes; + } + } From a88830d2c5c5586c3ef428890b321176c6bcc673 Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Tue, 14 Jul 2020 18:16:25 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=BC=9A=E5=91=98?= =?UTF-8?q?=E6=B2=A1=E6=9C=89parentTeanantId=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/iformall/tenant/TenantInfoImpl.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java b/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java index 6a757c08d..38afaebd9 100644 --- a/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java +++ b/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java @@ -115,9 +115,6 @@ public class TenantInfoImpl implements TenantInfo { if ("wx_c_user".equals(tableName)) { return true; } - if ("wx_c_user_basic_info".equals(tableName)) { - return true; - } if ("wx_c_user_car".equals(tableName)) { return true; } From c167389389b63dfe1b54b36e4415419b28d06ad1 Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Wed, 15 Jul 2020 17:42:34 +0800 Subject: [PATCH 4/4] fix bug --- .../src/main/java/com/iformall/tenant/TenantInfoImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java b/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java index 38afaebd9..caf5d3ff6 100644 --- a/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java +++ b/mallinkAdmin/src/main/java/com/iformall/tenant/TenantInfoImpl.java @@ -115,6 +115,9 @@ public class TenantInfoImpl implements TenantInfo { if ("wx_c_user".equals(tableName)) { return true; } + if ("wx_c_user_basic_info".equals(tableName)) { + return true; + } if ("wx_c_user_car".equals(tableName)) { return true; }