|
@@ -34,8 +34,15 @@ func (l *GetMessageRecordsListLogic) GetMessageRecordsList(req *types.MessageRec
|
|
|
// 按机构ID搜
|
|
|
predicates = append(predicates, messagerecords.OrganizationIDEQ(organizationId))
|
|
|
// 按群发ID搜
|
|
|
- predicates = append(predicates, messagerecords.SourceIDEQ(*req.BatchMsgId))
|
|
|
-
|
|
|
+ if req.BatchMsgId != nil {
|
|
|
+ predicates = append(predicates, messagerecords.SourceIDEQ(*req.BatchMsgId))
|
|
|
+ }
|
|
|
+ if req.SourceType != nil {
|
|
|
+ predicates = append(predicates, messagerecords.SourceTypeEQ(*req.SourceType))
|
|
|
+ }
|
|
|
+ if req.SourceId != nil {
|
|
|
+ predicates = append(predicates, messagerecords.SourceIDEQ(*req.SourceId))
|
|
|
+ }
|
|
|
if req.BotWxid != nil {
|
|
|
predicates = append(predicates, messagerecords.BotWxidContains(*req.BotWxid))
|
|
|
}
|