Browse Source

Merge branch 'lcd250411' into debug

lichangdong 3 tuần trước cách đây
mục cha
commit
452f923d51
1 tập tin đã thay đổi với 4 bổ sung7 xóa
  1. 4 7
      internal/logic/contact/get_contact_list_logic.go

+ 4 - 7
internal/logic/contact/get_contact_list_logic.go

@@ -63,8 +63,8 @@ func (l *GetContactListLogic) GetContactList(req *types.ContactListReq) (*types.
 	var startTime, endTime *time.Time
 
 	if req.StartDate != nil && *req.StartDate != "" {
-		startStr := *req.StartDate + " 00:00:00"
-		if t, err := time.Parse(layout, startStr); err == nil {
+		//startStr := *req.StartDate + " 00:00:00"
+		if t, err := time.Parse(layout, *req.StartDate); err == nil {
 			t = t.Add(23*time.Hour + 59*time.Minute + 59*time.Second)
 			startTime = &t
 		} else {
@@ -73,8 +73,8 @@ func (l *GetContactListLogic) GetContactList(req *types.ContactListReq) (*types.
 	}
 
 	if req.EndDate != nil && *req.EndDate != "" {
-		endStr := *req.EndDate + " 23:59:59"
-		if t, err := time.Parse(layout, endStr); err == nil {
+		//endStr := *req.EndDate + " 23:59:59"
+		if t, err := time.Parse(layout, *req.EndDate); err == nil {
 			t = t.Add(23*time.Hour + 59*time.Minute + 59*time.Second)
 			endTime = &t
 		} else {
@@ -90,9 +90,6 @@ func (l *GetContactListLogic) GetContactList(req *types.ContactListReq) (*types.
 	if endTime != nil {
 		relPreds = append(relPreds, labelrelationship.CreatedAtLTE(*endTime))
 	}
-	if len(relPreds) > 0 {
-		predicates = append(predicates, contact.HasContactRelationshipsWith(relPreds...))
-	}
 
 	if len(req.LabelIDs) > 0 {
 		relPreds = append(relPreds,