1
This commit is contained in:
parent
b5c46e24f7
commit
aebb68aa25
@ -108,13 +108,7 @@ type UserStackingPo struct {
|
||||
Contracts []*ContractStackingPo `json:"contracts"`
|
||||
}
|
||||
|
||||
type ContractStakeCecPo struct {
|
||||
Account string `json:"account"`
|
||||
Token string `json:"token"`
|
||||
Amount string `json:"amount"`
|
||||
}
|
||||
|
||||
type ContractUnstakeCecPo struct {
|
||||
type ContractStakeAndUnstakeCecPo struct {
|
||||
Account string `json:"account"`
|
||||
Token string `json:"token"`
|
||||
Amount string `json:"amount"`
|
||||
@ -153,13 +147,8 @@ func NewContractStackingPo() *ContractStackingPo {
|
||||
return p
|
||||
}
|
||||
|
||||
func NewContractStakeCecPo() *ContractStakeCecPo {
|
||||
p := new(ContractStakeCecPo)
|
||||
return p
|
||||
}
|
||||
|
||||
func NewContractUnstakeCecPo() *ContractUnstakeCecPo {
|
||||
p := new(ContractUnstakeCecPo)
|
||||
func NewContractStakeAndUnstakeCecPo() *ContractStakeAndUnstakeCecPo {
|
||||
p := new(ContractStakeAndUnstakeCecPo)
|
||||
return p
|
||||
}
|
||||
|
||||
|
@ -80,12 +80,8 @@ func (this *stackingCec) saveToDb(ds *f5.DataSet) bool {
|
||||
createTime := ds.GetByName("createtime")
|
||||
modifyTime := ds.GetByName("modifytime")
|
||||
|
||||
accountAddress := ""
|
||||
token := ""
|
||||
amount := ""
|
||||
|
||||
decodeJsonOk := false
|
||||
p := new(itemSoldOut)
|
||||
p := jccommon.NewContractStakeAndUnstakeCecPo()
|
||||
if q5.DecodeJson(returnValues, p) == nil {
|
||||
decodeJsonOk = true
|
||||
dbErr, _, _ := f5.GetGoStyleDb().NewUpsert(
|
||||
@ -105,9 +101,9 @@ func (this *stackingCec) saveToDb(ds *f5.DataSet) bool {
|
||||
{"contract_address", strings.ToLower(contractAddress)},
|
||||
{"src_idx", idx},
|
||||
{"event_name", eventName},
|
||||
{"account_address", accountAddress},
|
||||
{"token_address", token},
|
||||
{"amount", amount},
|
||||
{"account_address", p.Account},
|
||||
{"token_address", p.Token},
|
||||
{"amount", p.Amount},
|
||||
{"createtime", createTime},
|
||||
{"modifytime", modifyTime},
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user