修改排序
This commit is contained in:
parent
1b00034511
commit
d2410ae07f
@ -119,19 +119,19 @@ func (ea *EventApi) ActivityQuery(c *gin.Context) {
|
||||
q5.AppendSlice(&subFilters, f5.GetDbFilter().Custom(inSub).And())
|
||||
}
|
||||
}
|
||||
orderBy := ""
|
||||
{
|
||||
for _, val := range reqJson.Sort.Fields {
|
||||
if val.Name == "price" && orderBy == "" {
|
||||
t := q5.SafeToInt32(val.Type)
|
||||
if t < 0 {
|
||||
orderBy = " ORDER BY price_len DESC, price DESC"
|
||||
} else {
|
||||
orderBy = " ORDER BY price_len ASC, price ASC"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
orderBy := " ORDER BY createtime DESC "
|
||||
// {
|
||||
// for _, val := range reqJson.Sort.Fields {
|
||||
// if val.Name == "price" && orderBy == "" {
|
||||
// t := q5.SafeToInt32(val.Type)
|
||||
// if t < 0 {
|
||||
// orderBy = " ORDER BY price_len DESC, price DESC"
|
||||
// } else {
|
||||
// orderBy = " ORDER BY price_len ASC, price ASC"
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
rspObj := struct {
|
||||
ErrCode int32 `json:"errcode"`
|
||||
|
Loading…
x
Reference in New Issue
Block a user