优化视频补充信息查询条件
This commit is contained in:
parent
bc0f15f77e
commit
4dd5ff48da
@ -8,6 +8,7 @@ package dao
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/fonchain/fonchain-artistinfo/cmd/model"
|
||||
"github.com/fonchain/fonchain-artistinfo/pb/artistinfoArtshow"
|
||||
db "github.com/fonchain/fonchain-artistinfo/pkg/db"
|
||||
@ -75,10 +76,12 @@ func (a artistinfoArtshowVideo) GetDataList(req *artistinfoArtshow.GetArtshowVid
|
||||
tx = tx.Where("lock_time = ?", req.LockTime)
|
||||
}
|
||||
if req.ArtistName != "" {
|
||||
tx = tx.Clauses(clause.Like{
|
||||
Column: "artist_name",
|
||||
Value: "%" + req.ArtistName + "%",
|
||||
})
|
||||
// tx = tx.Clauses(clause.Like{
|
||||
// Column: "artist_name",
|
||||
// Value: "%" + req.ArtistName + "%",
|
||||
// })
|
||||
var searchName = "%" + req.ArtistName + "%"
|
||||
tx = tx.Where("artist_name LIKE ? OR artist_uid LIKE ?", searchName, searchName)
|
||||
}
|
||||
if req.Status != 0 {
|
||||
tx = tx.Where("status = ?", req.Status)
|
||||
|
Loading…
Reference in New Issue
Block a user