作者 tangxvhui

调整 参数值

... ... @@ -125,13 +125,13 @@ func (repository *ArticleRepository) Find(ctx context.Context, conn transaction.
if v, ok := queryOptions["orderMode"]; ok {
mode := v.(string)
switch mode {
case "CountComment ASC":
case "countComment ascending":
tx = tx.Order("count_comment asc")
case "CountComment DESC":
case "countComment descending":
tx = tx.Order("count_comment desc")
case "CountLove ASC":
case "countLove ascending":
tx = tx.Order("count_love asc")
case "CountLove DESC":
case "countLove descending":
tx = tx.Order("count_love desc")
default:
tx = tx.Order("id desc")
... ...