This commit is contained in:
苏尹岚
2021-03-15 17:36:17 +08:00
parent a1b173fdd9
commit aedb4e7649

View File

@@ -1207,7 +1207,13 @@ func GetStoreManageState(db *DaoDB, storeIDs []int, vendorID, sortType, offset,
sqlParams = append(sqlParams, vendorID)
}
if sortType != 0 {
if GetStoreManageStateSortTypeMap[sortType] != "" {
tempSortType := 0
if sortType < 0 {
tempSortType = -sortType
} else {
tempSortType = sortType
}
if GetStoreManageStateSortTypeMap[tempSortType] != "" {
sql += " ORDER BY " + GetStoreManageStateSortTypeMap[sortType]
if sortType < 0 {
sql += " DESC"