1
This commit is contained in:
parent
ee7e7073c3
commit
e7d4c139eb
18
server/marketserver/mt/Web3ServiceCluster.go
Normal file
18
server/marketserver/mt/Web3ServiceCluster.go
Normal file
@ -0,0 +1,18 @@
|
||||
package mt
|
||||
|
||||
import (
|
||||
"f5"
|
||||
"mtb"
|
||||
)
|
||||
|
||||
type Web3ServiceCluster struct {
|
||||
mtb.Web3ServiceCluster
|
||||
}
|
||||
|
||||
type Web3ServiceClusterTable struct {
|
||||
f5.IdMetaTable[Web3ServiceCluster]
|
||||
}
|
||||
|
||||
func (this *Web3ServiceCluster) Init1() {
|
||||
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
package mt
|
||||
|
||||
import (
|
||||
"f5"
|
||||
"mtb"
|
||||
)
|
||||
|
||||
type Web3SignCluster struct {
|
||||
mtb.Web3SignCluster
|
||||
}
|
||||
|
||||
type Web3SignClusterTable struct {
|
||||
f5.IdMetaTable[Web3SignCluster]
|
||||
}
|
||||
|
||||
func (this *Web3SignCluster) Init1() {
|
||||
|
||||
}
|
@ -12,7 +12,7 @@ type table struct {
|
||||
Config *ConfigTable
|
||||
Item *ItemTable
|
||||
Contract *ContractTable
|
||||
Web3SignCluster *Web3SignClusterTable
|
||||
Web3ServiceCluster *Web3ServiceClusterTable
|
||||
}
|
||||
|
||||
var Table = f5.New(func(this *table) {
|
||||
@ -51,8 +51,8 @@ var Table = f5.New(func(this *table) {
|
||||
this.PrimKey = "name"
|
||||
})
|
||||
|
||||
this.Web3SignCluster = f5.New(func(this *Web3SignClusterTable) {
|
||||
this.FileName = "../config/web3sign.cluster.json"
|
||||
this.Web3ServiceCluster = f5.New(func(this *Web3ServiceClusterTable) {
|
||||
this.FileName = "../config/web3service.cluster.json"
|
||||
this.PrimKey = ""
|
||||
})
|
||||
|
||||
|
@ -69,7 +69,7 @@ type Contract struct {
|
||||
_flags2_ uint64
|
||||
}
|
||||
|
||||
type Web3SignCluster struct {
|
||||
type Web3ServiceCluster struct {
|
||||
url string
|
||||
|
||||
_flags1_ uint64
|
||||
@ -260,11 +260,11 @@ func (this *Contract) HasAddress() bool {
|
||||
return (this._flags1_ & (uint64(1) << 4)) > 0
|
||||
}
|
||||
|
||||
func (this *Web3SignCluster) GetUrl() string {
|
||||
func (this *Web3ServiceCluster) GetUrl() string {
|
||||
return this.url
|
||||
}
|
||||
|
||||
func (this *Web3SignCluster) HasUrl() bool {
|
||||
func (this *Web3ServiceCluster) HasUrl() bool {
|
||||
return (this._flags1_ & (uint64(1) << 1)) > 0
|
||||
}
|
||||
|
||||
@ -313,6 +313,6 @@ func (this *Contract) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.address, "address", &this._flags1_, 4, kv)
|
||||
}
|
||||
|
||||
func (this *Web3SignCluster) LoadFromKv(kv map[string]interface{}) {
|
||||
func (this *Web3ServiceCluster) LoadFromKv(kv map[string]interface{}) {
|
||||
f5.ReadMetaTableField(&this.url, "url", &this._flags1_, 1, kv)
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ message Contract
|
||||
optional string address = 4;
|
||||
}
|
||||
|
||||
message Web3SignCluster
|
||||
message Web3ServiceCluster
|
||||
{
|
||||
optional string url = 1;
|
||||
}
|
||||
|
@ -3,8 +3,8 @@ package service
|
||||
import (
|
||||
"q5"
|
||||
"f5"
|
||||
"mt"
|
||||
"fmt"
|
||||
//"mt"
|
||||
//"fmt"
|
||||
"jccommon"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
@ -54,7 +54,8 @@ func Unlock721Nft(c *gin.Context, tokenType int32) {
|
||||
Params: []string{},
|
||||
}
|
||||
paramsStr := q5.EncodeJson(reqJson)
|
||||
url := fmt.Sprintf("%s/webapp/index.php", mt.Table.Web3SignCluster.RandElement().GetUrl())
|
||||
//url := fmt.Sprintf("%s/webapp/index.php", mt.Table.Web3SignCluster.RandElement().GetUrl())
|
||||
url := ""
|
||||
f5.GetHttpCliMgr().SendGoStyleJsonRspPost(
|
||||
url,
|
||||
params,
|
||||
|
Loading…
x
Reference in New Issue
Block a user