From d523d62abd95dc61e6b7bb11acc5905aaf0c254c Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 13 Jun 2023 19:07:57 +0800 Subject: [PATCH] fix --- model/gmodel/fsproductmodel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model/gmodel/fsproductmodel.go b/model/gmodel/fsproductmodel.go index feaaa7e4..1df06768 100755 --- a/model/gmodel/fsproductmodel.go +++ b/model/gmodel/fsproductmodel.go @@ -52,9 +52,9 @@ func (p *FsProductModel) GetProductListByIds(ctx context.Context, productIds []i Where("`id` in (?) and `is_del` =? and `is_shelf` = ? and `status` =?", productIds, 0, 1, 1) switch sort { case "sort-asc": - db = db.Order("sort ASC") + db = db.Order("`sort` ASC") case "sort-desc": - db = db.Order("sort DESC") + db = db.Order("`sort` DESC") } if err = db.Find(&resp).Error; err != nil { return nil, err