Skip to content

Commit

Permalink
搞定
Browse files Browse the repository at this point in the history
  • Loading branch information
yisar committed May 11, 2024
1 parent bcedd25 commit f36e1ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion db/def.go
Expand Up @@ -49,7 +49,7 @@ type Post struct {
Uname string `json:"uname,omitempty"`
Uqq string `json:"uqq,omitempty"`
Videos string `json:"videos,omitempty"`
Pv int `json:"sort"`
Pv int `json:"pv,omitempty"`
}

type Actions struct {
Expand Down
6 changes: 3 additions & 3 deletions db/post.go
Expand Up @@ -201,9 +201,9 @@ func GetRank(day string) ([]*Post, error) {
defer stmt.Close()

for rows.Next() {
var id, pv int
var title, content, status, sort, tag, ctime, videos string
if err := rows.Scan(&id, &title, &content, &status, &sort, &tag, &ctime, &videos); err != nil {
var id, pv, uid int
var title, content, status, sort, tag, ctime, videos, uname, uqq string
if err := rows.Scan(&id, &title, &content, &status, &sort, &tag, &ctime, &videos, pv, uid, uname, uqq); err != nil {
return res, err
}

Expand Down

0 comments on commit f36e1ec

Please sign in to comment.