diff --git a/business/model/dao/store.go b/business/model/dao/store.go index 306a8307c..a2dae7498 100644 --- a/business/model/dao/store.go +++ b/business/model/dao/store.go @@ -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"