From aedb4e7649f29b3e50d6c11d576a864deb6af86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 15 Mar 2021 17:36:17 +0800 Subject: [PATCH] aa --- business/model/dao/store.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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"