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