Преглед изворни кода

fix:关联公告sql排序语句修改

duxin пре 3 година
родитељ
комит
906ccbca0c
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      rpc/consumer/internal/logic/inforelatedlogic.go

+ 1 - 1
rpc/consumer/internal/logic/inforelatedlogic.go

@@ -38,7 +38,7 @@ func (l *InfoRelatedLogic) InfoRelated(in *consumer.UserIdReq) (*consumer.InfoRe
 		quryname = ` and title LIKE '%` + in.Match + `%' `
 	}
 
-	allData := model.Mysql.SelectBySql(`SELECT id,title  from information WHERE user_id="` + in.UserId + `" and published=2 and is_del=1` + quryname + ` limit 50`)
+	allData := model.Mysql.SelectBySql(`SELECT id,title from information WHERE user_id="` + in.UserId + `" and published=2 and is_del=1` + quryname + ` order by create_time desc limit 50`)
 	if allData == nil || len(*allData) == 0 {
 		return &resq, nil
 	}