This commit is contained in:
aozhiwei 2024-06-28 10:48:42 +08:00
parent b70c939eaa
commit 284bad91b8
5 changed files with 10 additions and 9 deletions

View File

@ -1,22 +1,22 @@
[
{
"name": "Ethereum",
"contract_address": "0xfd42bfb03212da7e1a4608a44d7658641d99cf34",
"contract_address": "0xe9E96d1aad82562b7588F03f49aD34186f996478",
"current_price": 3371.1
},
{
"name": "USDC",
"contract_address": "",
"contract_address": "0x3b2d8a1931736fc321c24864bceee981b11c3c57",
"current_price": 0.999334
},
{
"name": "Immutable",
"contract_address": "",
"contract_address": "0x1ccca691501174b4a623ceda58cc8f1a76dc3439",
"current_price": 1.54
},
{
"name": "NATIVE",
"contract_address": "",
"contract_address": "0xFd42bfb03212dA7e1A4608a44d7658641D99CF34",
"current_price": 1.54
}
]

View File

@ -74,6 +74,7 @@ func (this* repairOrder) repairPrice(ds *f5.DataSet) bool {
{"src_price_contract_address", srcPriceContractAddress},
{"src_price_item_type", srcPriceItemType},
{"price", price},
{"price_len", q5.ToString(len(price))},
{"src_price_exchange_rate", q5.ToString(srcPriceExchangeRate)},
}
f5.GetGoStyleDb().Update(

View File

@ -158,6 +158,7 @@ func (this* webHook) orderUpdatedCb(ds *f5.DataSet) bool {
{"src_price_contract_address", srcPriceContractAddress},
{"src_price_item_type", srcPriceItemType},
{"price", price},
{"price_len", q5.ToString(len(price))},
{"src_price_exchange_rate", q5.ToString(srcPriceExchangeRate)},
}
updateFields := commonFields[0:]

View File

@ -71,19 +71,18 @@ SELECT * FROM t_order A WHERE idx > %d AND net_id = %d
}*/
orderBy := ""
/*
{
for _, val := range reqJson.Sort.Fields {
if val.Name == "price" && orderBy == "" {
t := q5.SafeToInt32(val.Type)
if t < 0 {
orderBy = " ORDER BY LENGTH(price) DESC, price DESC"
orderBy = " ORDER BY price_len DESC, price DESC"
} else {
orderBy = " ORDER BY LENGTH(price) ASC, price ASC"
orderBy = " ORDER BY price_len ASC, price ASC"
}
}
}
}
}*/
subFilters := []f5.DbQueryFilter{}
{
priceMin := q5.SafeToString(reqJson.Filter.PriceMin)

2
third_party/f5 vendored

@ -1 +1 @@
Subproject commit a038d666cb781700bf00bce48cc3c68e2591b4db
Subproject commit b41d63fcbb606038b4e906c6a598ca4563c49d24