From 1b953779ae33e6105e75c398c8159e611afce27b Mon Sep 17 00:00:00 2001 From: GY <997485446@qq.com> Date: Wed, 18 Jan 2023 19:01:36 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat=20=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/dev/dubbogo.yaml | 2 +- conf/dev/sdk.real.yaml | 18 ------------------ conf/dev/sdk.test.yaml | 18 ------------------ conf/dev/sdk.yaml | 18 ------------------ conf/prod/conf.ini | 12 ++++++------ conf/prod/dubbogo.yaml | 2 +- conf/prod/sdk.real.yaml | 18 ------------------ conf/prod/sdk.test.yaml | 18 ------------------ conf/prod/sdk.yaml | 18 ------------------ conf/test/conf.ini | 4 ++-- conf/test/dubbogo.yaml | 11 +---------- conf/test/sdk.real.yaml | 18 ------------------ conf/test/sdk.test.yaml | 18 ------------------ conf/test/sdk.yaml | 18 ------------------ 14 files changed, 11 insertions(+), 182 deletions(-) delete mode 100644 conf/dev/sdk.real.yaml delete mode 100644 conf/dev/sdk.test.yaml delete mode 100644 conf/dev/sdk.yaml delete mode 100644 conf/prod/sdk.real.yaml delete mode 100644 conf/prod/sdk.test.yaml delete mode 100644 conf/prod/sdk.yaml delete mode 100644 conf/test/sdk.real.yaml delete mode 100644 conf/test/sdk.test.yaml delete mode 100644 conf/test/sdk.yaml diff --git a/conf/dev/dubbogo.yaml b/conf/dev/dubbogo.yaml index fe1e5ab..5e41ddf 100644 --- a/conf/dev/dubbogo.yaml +++ b/conf/dev/dubbogo.yaml @@ -12,7 +12,7 @@ dubbo: protocols: triple: #triple name: tri - port: 20004 + port: 20015 provider: services: ArtistProvider: diff --git a/conf/dev/sdk.real.yaml b/conf/dev/sdk.real.yaml deleted file mode 100644 index 2d5ba00..0000000 --- a/conf/dev/sdk.real.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# endorseService Info -# testNet addrs -endorseServiceHost: "39.156.69.83:37100" -complianceCheck: - # 是否需要进行合规性背书 - isNeedComplianceCheck: false - # 是否需要支付合规性背书费用 - isNeedComplianceCheckFee: false - # 合规性背书费用 - complianceCheckEndorseServiceFee: 400 - # 支付合规性背书费用的收款地址 - complianceCheckEndorseServiceFeeAddr: aB2hpHnTBDxko3UoP2BpBZRujwhdcAFoT - # 如果通过合规性检查,签发认证签名的地址 - complianceCheckEndorseServiceAddr: jknGxa6eyum1JrATWvSJKW3thJ9GKHA9n -#创建平行链所需要的最低费用 -minNewChainAmount: "100" -crypto: "xchain" -txVersion: 1 \ No newline at end of file diff --git a/conf/dev/sdk.test.yaml b/conf/dev/sdk.test.yaml deleted file mode 100644 index adf2678..0000000 --- a/conf/dev/sdk.test.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# endorseService Info -# testNet addrs -endorseServiceHost: "14.215.179.74:37101" -complianceCheck: - # 是否需要进行合规性背书 - isNeedComplianceCheck: true - # 是否需要支付合规性背书费用 - isNeedComplianceCheckFee: true - # 合规性背书费用 - complianceCheckEndorseServiceFee: 100 - # 支付合规性背书费用的收款地址 - complianceCheckEndorseServiceFeeAddr: cHvBK1TTB52GYtVxHK7HnW8N9RTqkN99R - # 如果通过合规性检查,签发认证签名的地址 - complianceCheckEndorseServiceAddr: XDxkpQkfLwG6h56e896f3vBHhuN5g6M9u -#创建平行链所需要的最低费用 -minNewChainAmount: "100" -crypto: "xchain" -txVersion: 1 \ No newline at end of file diff --git a/conf/dev/sdk.yaml b/conf/dev/sdk.yaml deleted file mode 100644 index b6c1ebe..0000000 --- a/conf/dev/sdk.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# endorseService Info -# testNet addrs -# endorseServiceHost: "120.48.24.223:37101" -endorseServiceHost: "127.0.0.1:37101" -complianceCheck: - # 是否需要进行合规性背书 - isNeedComplianceCheck: false - # 是否需要支付合规性背书费用 - isNeedComplianceCheckFee: false - # 合规性背书费用 - complianceCheckEndorseServiceFee: 400 - # 支付合规性背书费用的收款地址 - complianceCheckEndorseServiceFeeAddr: WwLgfAatHyKx2mCJruRaML4oVf7Chzp42 - # 如果通过合规性检查,签发认证签名的地址 - complianceCheckEndorseServiceAddr: WwLgfAatHyKx2mCJruRaML4oVf7Chzp42 -#创建平行链所需要的最低费用 -minNewChainAmount: "100" -crypto: "xchain" diff --git a/conf/prod/conf.ini b/conf/prod/conf.ini index 7c82154..3650b5a 100644 --- a/conf/prod/conf.ini +++ b/conf/prod/conf.ini @@ -3,15 +3,15 @@ mode = prod #正式prod #测试dev [mysql] Db = mysql -DbHost = 192.168.1.35 -DbPort = 9005 -DbUser = root -DbPassWord = sLl0b7stlbwvZ883TV -DbArtist = artist +DbHost = mysql +DbPort = 3306 +DbUser = fonchain +DbPassWord = C250PflXIWv2SQm +DbName = artistmgmt [redis] RedisDB = 2 -RedisAddr = 192.168.1.35:6379 +RedisAddr = redis:6379 RedisPW = RedisDBNAme = diff --git a/conf/prod/dubbogo.yaml b/conf/prod/dubbogo.yaml index a1dcc5f..11f37fd 100644 --- a/conf/prod/dubbogo.yaml +++ b/conf/prod/dubbogo.yaml @@ -12,7 +12,7 @@ dubbo: protocols: triple: #triple name: tri - port: 20004 + port: 20015 provider: services: ArtistProvider: diff --git a/conf/prod/sdk.real.yaml b/conf/prod/sdk.real.yaml deleted file mode 100644 index 2d5ba00..0000000 --- a/conf/prod/sdk.real.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# endorseService Info -# testNet addrs -endorseServiceHost: "39.156.69.83:37100" -complianceCheck: - # 是否需要进行合规性背书 - isNeedComplianceCheck: false - # 是否需要支付合规性背书费用 - isNeedComplianceCheckFee: false - # 合规性背书费用 - complianceCheckEndorseServiceFee: 400 - # 支付合规性背书费用的收款地址 - complianceCheckEndorseServiceFeeAddr: aB2hpHnTBDxko3UoP2BpBZRujwhdcAFoT - # 如果通过合规性检查,签发认证签名的地址 - complianceCheckEndorseServiceAddr: jknGxa6eyum1JrATWvSJKW3thJ9GKHA9n -#创建平行链所需要的最低费用 -minNewChainAmount: "100" -crypto: "xchain" -txVersion: 1 \ No newline at end of file diff --git a/conf/prod/sdk.test.yaml b/conf/prod/sdk.test.yaml deleted file mode 100644 index adf2678..0000000 --- a/conf/prod/sdk.test.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# endorseService Info -# testNet addrs -endorseServiceHost: "14.215.179.74:37101" -complianceCheck: - # 是否需要进行合规性背书 - isNeedComplianceCheck: true - # 是否需要支付合规性背书费用 - isNeedComplianceCheckFee: true - # 合规性背书费用 - complianceCheckEndorseServiceFee: 100 - # 支付合规性背书费用的收款地址 - complianceCheckEndorseServiceFeeAddr: cHvBK1TTB52GYtVxHK7HnW8N9RTqkN99R - # 如果通过合规性检查,签发认证签名的地址 - complianceCheckEndorseServiceAddr: XDxkpQkfLwG6h56e896f3vBHhuN5g6M9u -#创建平行链所需要的最低费用 -minNewChainAmount: "100" -crypto: "xchain" -txVersion: 1 \ No newline at end of file diff --git a/conf/prod/sdk.yaml b/conf/prod/sdk.yaml deleted file mode 100644 index b6c1ebe..0000000 --- a/conf/prod/sdk.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# endorseService Info -# testNet addrs -# endorseServiceHost: "120.48.24.223:37101" -endorseServiceHost: "127.0.0.1:37101" -complianceCheck: - # 是否需要进行合规性背书 - isNeedComplianceCheck: false - # 是否需要支付合规性背书费用 - isNeedComplianceCheckFee: false - # 合规性背书费用 - complianceCheckEndorseServiceFee: 400 - # 支付合规性背书费用的收款地址 - complianceCheckEndorseServiceFeeAddr: WwLgfAatHyKx2mCJruRaML4oVf7Chzp42 - # 如果通过合规性检查,签发认证签名的地址 - complianceCheckEndorseServiceAddr: WwLgfAatHyKx2mCJruRaML4oVf7Chzp42 -#创建平行链所需要的最低费用 -minNewChainAmount: "100" -crypto: "xchain" diff --git a/conf/test/conf.ini b/conf/test/conf.ini index 5414059..02c95a7 100644 --- a/conf/test/conf.ini +++ b/conf/test/conf.ini @@ -3,11 +3,11 @@ mode = dev #正式prod #测试dev [mysql] Db = mysql -DbHost = 172.16.100.99 #214 +DbHost = 121.229.45.214 DbPort = 9007 DbUser = artuser DbPassWord = "C250PflXIWv2SQm8" -DbArtist = artist +DbName = artistmgmt [redis] RedisDB = 2 diff --git a/conf/test/dubbogo.yaml b/conf/test/dubbogo.yaml index 5859060..ff2344a 100644 --- a/conf/test/dubbogo.yaml +++ b/conf/test/dubbogo.yaml @@ -16,21 +16,12 @@ dubbo: triple: #triple name: tri # ip: 121.229.45.214 - port: 20004 + port: 20015 provider: services: ArtistProvider: interface: com.fontree.microservices.common.Artist retries: 0 - filter: tps -# token: "dubbo" -# application: "1234" - tps.limiter: method-service - tps.limit.strategy: fixedWindow - tps.limit.rejected.handler: DefaultValueHandler - tps.limit.interval: 1000 - tps.limit.rate: 3 - warmup: 100 #预热时间 logger: zap-config: level: info # 日志级别 diff --git a/conf/test/sdk.real.yaml b/conf/test/sdk.real.yaml deleted file mode 100644 index 2d5ba00..0000000 --- a/conf/test/sdk.real.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# endorseService Info -# testNet addrs -endorseServiceHost: "39.156.69.83:37100" -complianceCheck: - # 是否需要进行合规性背书 - isNeedComplianceCheck: false - # 是否需要支付合规性背书费用 - isNeedComplianceCheckFee: false - # 合规性背书费用 - complianceCheckEndorseServiceFee: 400 - # 支付合规性背书费用的收款地址 - complianceCheckEndorseServiceFeeAddr: aB2hpHnTBDxko3UoP2BpBZRujwhdcAFoT - # 如果通过合规性检查,签发认证签名的地址 - complianceCheckEndorseServiceAddr: jknGxa6eyum1JrATWvSJKW3thJ9GKHA9n -#创建平行链所需要的最低费用 -minNewChainAmount: "100" -crypto: "xchain" -txVersion: 1 \ No newline at end of file diff --git a/conf/test/sdk.test.yaml b/conf/test/sdk.test.yaml deleted file mode 100644 index adf2678..0000000 --- a/conf/test/sdk.test.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# endorseService Info -# testNet addrs -endorseServiceHost: "14.215.179.74:37101" -complianceCheck: - # 是否需要进行合规性背书 - isNeedComplianceCheck: true - # 是否需要支付合规性背书费用 - isNeedComplianceCheckFee: true - # 合规性背书费用 - complianceCheckEndorseServiceFee: 100 - # 支付合规性背书费用的收款地址 - complianceCheckEndorseServiceFeeAddr: cHvBK1TTB52GYtVxHK7HnW8N9RTqkN99R - # 如果通过合规性检查,签发认证签名的地址 - complianceCheckEndorseServiceAddr: XDxkpQkfLwG6h56e896f3vBHhuN5g6M9u -#创建平行链所需要的最低费用 -minNewChainAmount: "100" -crypto: "xchain" -txVersion: 1 \ No newline at end of file diff --git a/conf/test/sdk.yaml b/conf/test/sdk.yaml deleted file mode 100644 index b6c1ebe..0000000 --- a/conf/test/sdk.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# endorseService Info -# testNet addrs -# endorseServiceHost: "120.48.24.223:37101" -endorseServiceHost: "127.0.0.1:37101" -complianceCheck: - # 是否需要进行合规性背书 - isNeedComplianceCheck: false - # 是否需要支付合规性背书费用 - isNeedComplianceCheckFee: false - # 合规性背书费用 - complianceCheckEndorseServiceFee: 400 - # 支付合规性背书费用的收款地址 - complianceCheckEndorseServiceFeeAddr: WwLgfAatHyKx2mCJruRaML4oVf7Chzp42 - # 如果通过合规性检查,签发认证签名的地址 - complianceCheckEndorseServiceAddr: WwLgfAatHyKx2mCJruRaML4oVf7Chzp42 -#创建平行链所需要的最低费用 -minNewChainAmount: "100" -crypto: "xchain" From dec8b41274c05d778de349cda7678fb93d3d2bbd Mon Sep 17 00:00:00 2001 From: GY <997485446@qq.com> Date: Wed, 18 Jan 2023 19:13:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat=20=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/dev/dubbogo.yaml | 2 +- conf/prod/dubbogo.yaml | 11 +---------- conf/test/dubbogo.yaml | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/conf/dev/dubbogo.yaml b/conf/dev/dubbogo.yaml index 5e41ddf..516ac03 100644 --- a/conf/dev/dubbogo.yaml +++ b/conf/dev/dubbogo.yaml @@ -12,7 +12,7 @@ dubbo: protocols: triple: #triple name: tri - port: 20015 + port: 20016 provider: services: ArtistProvider: diff --git a/conf/prod/dubbogo.yaml b/conf/prod/dubbogo.yaml index 11f37fd..b9c193d 100644 --- a/conf/prod/dubbogo.yaml +++ b/conf/prod/dubbogo.yaml @@ -12,21 +12,12 @@ dubbo: protocols: triple: #triple name: tri - port: 20015 + port: 20016 provider: services: ArtistProvider: interface: com.fontree.microservices.common.Artist retries: 0 - filter: tps -# token: "dubbo" -# application: "1234" - tps.limiter: method-service - tps.limit.strategy: fixedWindow - tps.limit.rejected.handler: DefaultValueHandler - tps.limit.interval: 1000 - tps.limit.rate: 3 - warmup: 100 #预热时间 logger: zap-config: level: info # 日志级别 diff --git a/conf/test/dubbogo.yaml b/conf/test/dubbogo.yaml index ff2344a..843b6f5 100644 --- a/conf/test/dubbogo.yaml +++ b/conf/test/dubbogo.yaml @@ -16,7 +16,7 @@ dubbo: triple: #triple name: tri # ip: 121.229.45.214 - port: 20015 + port: 20016 provider: services: ArtistProvider: From 88b6e24f065217cb11c446ea884f20113b169ee1 Mon Sep 17 00:00:00 2001 From: GY <997485446@qq.com> Date: Wed, 18 Jan 2023 19:54:29 +0800 Subject: [PATCH 3/3] feat --- cmd/app.go | 3 +++ conf/dev/dubbogo.yaml | 22 +++++++++++----------- conf/prod/dubbogo.yaml | 21 +++++++++++++++++---- conf/test/dubbogo.yaml | 13 +++++++++++-- 4 files changed, 42 insertions(+), 17 deletions(-) diff --git a/cmd/app.go b/cmd/app.go index 5983c8a..fd48ee0 100644 --- a/cmd/app.go +++ b/cmd/app.go @@ -17,6 +17,9 @@ import ( func main() { fmt.Println("第一处") config.SetProviderService(&controller.ArtistInfoProvider{}) + config.SetProviderService(&controller.ContractProvider{}) + config.SetProviderService(&controller.ArtWorkProvider{}) + config.SetProviderService(&controller.SupplyProvider{}) db.Init(m.SERVER_CONFIG) cache.InitRedis(m.SERVER_CONFIG) if err := config.Load(); err != nil { diff --git a/conf/dev/dubbogo.yaml b/conf/dev/dubbogo.yaml index 516ac03..015034f 100644 --- a/conf/dev/dubbogo.yaml +++ b/conf/dev/dubbogo.yaml @@ -15,18 +15,18 @@ dubbo: port: 20016 provider: services: - ArtistProvider: - interface: com.fontree.microservices.common.Artist + ArtistInfoProvider: + interface: com.fontree.microservices.common.ArtistInfo + retries: 0 + ContractProvider: + interface: com.fontree.microservices.common.Contract + retries: 0 + ArtWorkProvider: + interface: com.fontree.microservices.common.ArtWork + retries: 0 + SupplyProvider: + interface: com.fontree.microservices.common.Supply retries: 0 -# filter: myServerFilter -# application: "1234" - filter: tps - tps.limiter: method-service - tps.limit.strategy: fixedWindow - tps.limit.rejected.handler: DefaultValueHandler - tps.limit.interval: 1000 - tps.limit.rate: 3 - warmup: 100 #预热时间 logger: zap-config: level: info # 日志级别 diff --git a/conf/prod/dubbogo.yaml b/conf/prod/dubbogo.yaml index b9c193d..27bdb8b 100644 --- a/conf/prod/dubbogo.yaml +++ b/conf/prod/dubbogo.yaml @@ -3,20 +3,33 @@ dubbo: enable: true # default is true path: /metrics # default is /metrics port: 9091 # default is 9090 - namespace: dubboArtist # default is dubbo 作为数据上报 metrics 的前缀 + namespace: dubboArtist # default is dubbo 作为数据上报 metrics 的前 registries: demoZK: protocol: zookeeper timeout: 3s - address: 192.168.1.35:2181 +# address: 127.0.0.1:2181 +# address: 121.229.45.214:9004 +# address: 114.218.158.24:2181 + address: 172.16.100.93:2181 protocols: triple: #triple name: tri +# ip: 121.229.45.214 port: 20016 provider: services: - ArtistProvider: - interface: com.fontree.microservices.common.Artist + ArtistInfoProvider: + interface: com.fontree.microservices.common.ArtistInfo + retries: 0 + ContractProvider: + interface: com.fontree.microservices.common.Contract + retries: 0 + ArtWorkProvider: + interface: com.fontree.microservices.common.ArtWork + retries: 0 + SupplyProvider: + interface: com.fontree.microservices.common.Supply retries: 0 logger: zap-config: diff --git a/conf/test/dubbogo.yaml b/conf/test/dubbogo.yaml index 843b6f5..27bdb8b 100644 --- a/conf/test/dubbogo.yaml +++ b/conf/test/dubbogo.yaml @@ -19,8 +19,17 @@ dubbo: port: 20016 provider: services: - ArtistProvider: - interface: com.fontree.microservices.common.Artist + ArtistInfoProvider: + interface: com.fontree.microservices.common.ArtistInfo + retries: 0 + ContractProvider: + interface: com.fontree.microservices.common.Contract + retries: 0 + ArtWorkProvider: + interface: com.fontree.microservices.common.ArtWork + retries: 0 + SupplyProvider: + interface: com.fontree.microservices.common.Supply retries: 0 logger: zap-config: