|
@@ -30,7 +30,11 @@ func (l *GetLabelSelectListLogic) GetLabelSelectList(req *types.LabelListReq) (*
|
|
|
organizationId := l.ctx.Value("organizationId").(uint64)
|
|
|
var predicates []predicate.Label
|
|
|
predicates = append(predicates, label.OrganizationIDEQ(organizationId))
|
|
|
- predicates = append(predicates, label.Ctype(1))
|
|
|
+ var ctype uint64 = 1
|
|
|
+ if req.Ctype != nil && *req.Ctype > 0 {
|
|
|
+ ctype = *req.Ctype
|
|
|
+ }
|
|
|
+ predicates = append(predicates, label.Ctype(ctype))
|
|
|
if req.Type != nil {
|
|
|
predicates = append(predicates, label.TypeEQ(*req.Type))
|
|
|
}
|