Эх сурвалжийг харах

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

duxin 3 жил өмнө
parent
commit
906ccbca0c

+ 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
 	}