Skip to content

Commit

Permalink
DEV UPDATE:还是查不出来
Browse files Browse the repository at this point in the history
  • Loading branch information
misakajimmy committed Mar 8, 2023
1 parent 49778ac commit 9fee312
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions internal/app/api/idl/eoefans_video_page.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package idl

import (
"github.com/google/uuid"
"gorm.io/gorm"
"time"
)
Expand Down Expand Up @@ -67,8 +66,8 @@ func (EoefansVideoPageBanner) TableName() string {

type EoefansVideoPageVideo struct {
GVA_MODEL
BilbilVideo NewBilibiliVideo `json:"video" form:"video" gorm:"foreignKey:BilbilVideoId"`
BilbilVideoId uuid.UUID `json:"videoId" form:"videoId"`
BilbilVideo NewBilibiliVideo `json:"video" form:"video" gorm:"foreignKey:BilbilVideoUUID"`
BilbilVideoUUID string `json:"videoId" form:"videoId" gorm:"column:bilbil_video_id"`
EoefansVideoPages EoefansVideoPages `json:"vPage" form:"vPage" gorm:"foreignKey:EoefansVideoPageId"`
EoefansVideoPageId uint `json:"pageId" form:"pageId"`
Rank uint `json:"rank" form:"rank"`
Expand Down
2 changes: 1 addition & 1 deletion internal/repository/eoefans_video_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ func (impl *EoefansVideoPageMysqlImpl) FindAll() (list []*idl.EoefansVideoPageRe
Find(&bannerList).Error
fmt.Println("aaaaaaaaaaaaa")
err = impl.tx.Table(idl.EoefansVideoPageVideo{}.TableName()).
Preload("BilbilVideo").
Where("eoefans_video_page_id = ?", pageList[i].ID).
//Joins("JOIN bilbil_video ON bilbil_video.id = eoefans_video_page_video.bilbil_video_id").
Preload("BilbilVideo").
//Select("rank").
Find(&videoList).Error
res := idl.EoefansVideoPageResp{
Expand Down

0 comments on commit 9fee312

Please sign in to comment.