fix
This commit is contained in:
@@ -36,7 +36,8 @@ type GetAllTagByParamsReq struct {
|
||||
OrderBy string
|
||||
LevelPrefixLeftLike string //右模糊
|
||||
WithChild bool //是否包含子层级
|
||||
Category int64
|
||||
Category int64 //分类
|
||||
Level int64
|
||||
}
|
||||
|
||||
func (t *FsTagsModel) GetAllTagByParams(ctx context.Context, req GetAllTagByParamsReq) (resp []FsTags, err error) {
|
||||
@@ -50,6 +51,9 @@ func (t *FsTagsModel) GetAllTagByParams(ctx context.Context, req GetAllTagByPara
|
||||
if req.Category != 0 {
|
||||
db = db.Where("`category` = ?", req.Category)
|
||||
}
|
||||
if req.Level > 0 {
|
||||
db = db.Where("`level` = ?", req.Level)
|
||||
}
|
||||
if req.LevelPrefixLeftLike != "" {
|
||||
//查询子集
|
||||
if req.WithChild {
|
||||
|
||||
Reference in New Issue
Block a user