|
@@ -51,8 +51,11 @@ func convertLabelToLabelInfo(label *ent.Label) types.LabelInfo {
|
|
|
|
|
|
func (l *GetContactListLogic) GetContactList(req *types.ContactListReq) (*types.ContactListResp, error) {
|
|
|
organizationId := l.ctx.Value("organizationId").(uint64)
|
|
|
+ isAdmin := l.ctx.Value("isAdmin").(bool)
|
|
|
var predicates []predicate.Contact
|
|
|
- predicates = append(predicates, contact.OrganizationIDEQ(organizationId))
|
|
|
+ if req.WxWxid == nil || (req.WxWxid != nil && !isAdmin) {
|
|
|
+ predicates = append(predicates, contact.OrganizationIDEQ(organizationId))
|
|
|
+ }
|
|
|
|
|
|
var ctype uint64 = 1
|
|
|
if req.Ctype != nil {
|