Merge branch 'dev' of git.kingsome.cn:server/game2006go into dev
This commit is contained in:
commit
91ff2614af
@ -55,7 +55,6 @@ CREATE TABLE `t_mail` (
|
|||||||
`expiretime` int(11) NOT NULL DEFAULT '0' COMMENT '过期时间',
|
`expiretime` int(11) NOT NULL DEFAULT '0' COMMENT '过期时间',
|
||||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||||
UNIQUE KEY `idx` (`idx`),
|
|
||||||
UNIQUE KEY `unikey` (`unikey`),
|
UNIQUE KEY `unikey` (`unikey`),
|
||||||
UNIQUE KEY `mail_id` (`mail_id`),
|
UNIQUE KEY `mail_id` (`mail_id`),
|
||||||
PRIMARY KEY (`idx`)
|
PRIMARY KEY (`idx`)
|
||||||
@ -79,8 +78,8 @@ CREATE TABLE `t_group` (
|
|||||||
`deleted` int(11) NOT NULL DEFAULT '0' COMMENT '是否已删除',
|
`deleted` int(11) NOT NULL DEFAULT '0' COMMENT '是否已删除',
|
||||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||||
UNIQUE KEY `idx` (`idx`),
|
UNIQUE KEY `idx_group_id` (`group_id`),
|
||||||
PRIMARY KEY (`group_id`)
|
PRIMARY KEY (`idx`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
@ -99,8 +98,8 @@ CREATE TABLE `t_member` (
|
|||||||
`deleted` int(11) NOT NULL DEFAULT '0' COMMENT '是否已删除',
|
`deleted` int(11) NOT NULL DEFAULT '0' COMMENT '是否已删除',
|
||||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||||
UNIQUE KEY `idx` (`idx`),
|
UNIQUE KEY `idx_group_id_member_id` (`group_id`, `member_id`),
|
||||||
PRIMARY KEY (`group_id`, `member_id`)
|
PRIMARY KEY (`idx`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
@ -120,10 +119,10 @@ CREATE TABLE `t_inbox` (
|
|||||||
`expiretime` int(11) NOT NULL DEFAULT '0' COMMENT '过期时间',
|
`expiretime` int(11) NOT NULL DEFAULT '0' COMMENT '过期时间',
|
||||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||||
UNIQUE KEY `idx` (`idx`),
|
UNIQUE KEY `idx_account_id_mail_id` (`account_id`, `mail_id`),
|
||||||
PRIMARY KEY (`account_id`, `mail_id`),
|
|
||||||
KEY `idx_state` (`state`),
|
KEY `idx_state` (`state`),
|
||||||
KEY `idx_expiretime` (`expiretime`)
|
KEY `idx_expiretime` (`expiretime`),
|
||||||
|
PRIMARY KEY (`idx`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
@ -159,8 +158,8 @@ CREATE TABLE `t_param` (
|
|||||||
`param_val1` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '参数1',
|
`param_val1` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '参数1',
|
||||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||||
UNIQUE KEY `idx` (`idx`),
|
UNIQUE KEY `idx_param_name` (`param_name`),
|
||||||
PRIMARY KEY (`param_name`)
|
PRIMARY KEY (`idx`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
@ -187,8 +186,8 @@ CREATE TABLE `t_sys_mail` (
|
|||||||
`user_reg_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '用户注册结束时间',
|
`user_reg_end_time` int(11) NOT NULL DEFAULT '0' COMMENT '用户注册结束时间',
|
||||||
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||||
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
|
||||||
PRIMARY KEY (`idx`),
|
UNIQUE KEY `unikey` (`unikey`),
|
||||||
UNIQUE KEY `unikey` (`unikey`)
|
PRIMARY KEY (`idx`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
|
@ -30,7 +30,8 @@ func (this *bcCurrency) init() () {
|
|||||||
func (e *mt.BcCurrency) bool {
|
func (e *mt.BcCurrency) bool {
|
||||||
this.nameHash.Store(e.GetName(), int64(e.GetCurrentPrice() * DECIMALS))
|
this.nameHash.Store(e.GetName(), int64(e.GetCurrentPrice() * DECIMALS))
|
||||||
if e.GetContractAddress() != "" {
|
if e.GetContractAddress() != "" {
|
||||||
this.addressHash.Store(e.GetContractAddress(), int64(e.GetCurrentPrice() * DECIMALS))
|
this.addressHash.Store(strings.ToLower(e.GetContractAddress()),
|
||||||
|
int64(e.GetCurrentPrice() * DECIMALS))
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
|
@ -145,6 +145,7 @@ func (this* webHook) orderUpdatedCb(ds *f5.DataSet) bool {
|
|||||||
{"order_id", p.Data.Id},
|
{"order_id", p.Data.Id},
|
||||||
{"chain", p.Chain},
|
{"chain", p.Chain},
|
||||||
{"status", p.Data.Status.Name},
|
{"status", p.Data.Status.Name},
|
||||||
|
{"seller_address", strings.ToLower(p.Data.AccountAddress)},
|
||||||
{"item_id", q5.ToString(itemId)},
|
{"item_id", q5.ToString(itemId)},
|
||||||
{"hero_quality", q5.ToString(heroQuality)},
|
{"hero_quality", q5.ToString(heroQuality)},
|
||||||
{"start_time", q5.ToString(startTime)},
|
{"start_time", q5.ToString(startTime)},
|
||||||
|
@ -25,6 +25,7 @@ type OrderUpdatedEvent struct {
|
|||||||
Chain string `json:"chain"`
|
Chain string `json:"chain"`
|
||||||
Data struct {
|
Data struct {
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
|
AccountAddress string `json:"account_address"`
|
||||||
Buy [] struct {
|
Buy [] struct {
|
||||||
Amount string `json:"amount"`
|
Amount string `json:"amount"`
|
||||||
ContractAddress string `json:"contract_address"`
|
ContractAddress string `json:"contract_address"`
|
||||||
|
@ -76,6 +76,7 @@ WHERE A.idx > %d AND A.net_id = %d AND A.owner_address=? `,
|
|||||||
jsonData := val.NftCache.GetJsonData()
|
jsonData := val.NftCache.GetJsonData()
|
||||||
if jsonData != nil {
|
if jsonData != nil {
|
||||||
if v, ok := jsonData.(map[string]interface{}); ok {
|
if v, ok := jsonData.(map[string]interface{}); ok {
|
||||||
|
v := q5.MapClone(v)
|
||||||
if val.Param1 != 0 {
|
if val.Param1 != 0 {
|
||||||
v["on_sale"] = 1
|
v["on_sale"] = 1
|
||||||
} else {
|
} else {
|
||||||
|
@ -105,6 +105,7 @@ func (this *ShopCartApi) List(c *gin.Context) {
|
|||||||
|
|
||||||
func (this *ShopCartApi) Add(c *gin.Context) {
|
func (this *ShopCartApi) Add(c *gin.Context) {
|
||||||
openId := c.MustGet("open_id").(string)
|
openId := c.MustGet("open_id").(string)
|
||||||
|
accountAddress := c.MustGet("account_address").(string)
|
||||||
|
|
||||||
rspObj := &struct {
|
rspObj := &struct {
|
||||||
ErrCode int32 `json:"errcode"`
|
ErrCode int32 `json:"errcode"`
|
||||||
@ -175,14 +176,16 @@ func (this *ShopCartApi) Add(c *gin.Context) {
|
|||||||
err1 = err
|
err1 = err
|
||||||
if err == nil {
|
if err == nil {
|
||||||
if ds.Next() {
|
if ds.Next() {
|
||||||
cartDb.CurrSortIdx += 1
|
if ds.GetByName("seller_address") == accountAddress {
|
||||||
g := common.NewShopCartGoods()
|
cartDb.CurrSortIdx += 1
|
||||||
g.NetId = netId
|
g := common.NewShopCartGoods()
|
||||||
g.ContractAddress = contractAddress
|
g.NetId = netId
|
||||||
g.TokenId = tokenId
|
g.ContractAddress = contractAddress
|
||||||
g.SortIdx = cartDb.CurrSortIdx
|
g.TokenId = tokenId
|
||||||
g.AddTime = q5.ToInt32(f5.GetApp().GetRealSeconds())
|
g.SortIdx = cartDb.CurrSortIdx
|
||||||
q5.AppendSlice(&cartDb.Goods, g)
|
g.AddTime = q5.ToInt32(f5.GetApp().GetRealSeconds())
|
||||||
|
q5.AppendSlice(&cartDb.Goods, g)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,7 @@ func internalJwtAuth(c *gin.Context, maybe bool) {
|
|||||||
} else {
|
} else {
|
||||||
if maybe {
|
if maybe {
|
||||||
c.Set("open_id", "")
|
c.Set("open_id", "")
|
||||||
|
c.Set("account_address", "")
|
||||||
c.Next()
|
c.Next()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -62,6 +63,9 @@ func internalImmutJwtAuth(c *gin.Context, jwtToken string) {
|
|||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
EmailVerified bool `json:"email_verified"`
|
EmailVerified bool `json:"email_verified"`
|
||||||
Sid string `json:"sid"`
|
Sid string `json:"sid"`
|
||||||
|
Passport struct {
|
||||||
|
ZkevmEthAddress string `json:"zkevm_eth_address"`
|
||||||
|
} `json:"passport"`
|
||||||
} `json:"decoded"`
|
} `json:"decoded"`
|
||||||
}{}
|
}{}
|
||||||
rspObj := &struct {
|
rspObj := &struct {
|
||||||
@ -96,6 +100,7 @@ func internalImmutJwtAuth(c *gin.Context, jwtToken string) {
|
|||||||
}
|
}
|
||||||
openId := fmt.Sprintf("%d_2006_%s", jccommon.IMTBL_CHANNEL, jsonRspObj.Decoded.Sub)
|
openId := fmt.Sprintf("%d_2006_%s", jccommon.IMTBL_CHANNEL, jsonRspObj.Decoded.Sub)
|
||||||
c.Set("open_id", openId)
|
c.Set("open_id", openId)
|
||||||
|
c.Set("account_address", jsonRspObj.Decoded.Passport.ZkevmEthAddress)
|
||||||
c.Next()
|
c.Next()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -161,6 +166,7 @@ func internalMetaMaskJwtAuth(c *gin.Context, jwtToken string) {
|
|||||||
jccommon.BC_CHANNEL,
|
jccommon.BC_CHANNEL,
|
||||||
strings.ToLower(jsonRspObj.Decoded.OpenId))
|
strings.ToLower(jsonRspObj.Decoded.OpenId))
|
||||||
c.Set("open_id", openId)
|
c.Set("open_id", openId)
|
||||||
|
c.Set("account_address", strings.ToLower(jsonRspObj.Decoded.OpenId))
|
||||||
c.Next()
|
c.Next()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
2
third_party/f5
vendored
2
third_party/f5
vendored
@ -1 +1 @@
|
|||||||
Subproject commit b41d63fcbb606038b4e906c6a598ca4563c49d24
|
Subproject commit af0bd957c2e0e26e0933661908ddf5ad4d3974cc
|
2
third_party/q5
vendored
2
third_party/q5
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 91b9c416fb7a98cc8fac91e017968caf7b89510e
|
Subproject commit a0122ba8e585eb43765351cf206e319796e1d04a
|
Loading…
x
Reference in New Issue
Block a user