瀏覽代碼

fix:edit message_records/list

jimmyyem 9 月之前
父節點
當前提交
9605236acd

+ 1 - 7
desc/wechat/message_records.api

@@ -75,13 +75,7 @@ type (
         ContactWxid  *string `json:"contactWxid,optional"`
 
         // 发送内容 
-        Content  *string `json:"content,optional"`
-
-        // 发送内容
-        SourceType  *int `json:"sourceType,optional"`
-
-        // 发送内容
-        SourceId  *uint64 `json:"sourceId,optional"`
+        Status  *uint8 `json:"status,optional"`
     }
 
     // MessageRecords information response | MessageRecords信息返回体

+ 2 - 11
internal/logic/message_records/get_message_records_list_logic.go

@@ -35,17 +35,8 @@ func (l *GetMessageRecordsListLogic) GetMessageRecordsList(req *types.MessageRec
 	if req.BotWxid != nil {
 		predicates = append(predicates, messagerecords.BotWxidContains(*req.BotWxid))
 	}
-	if req.ContactWxid != nil {
-		predicates = append(predicates, messagerecords.ContactWxidContains(*req.ContactWxid))
-	}
-	if req.Content != nil {
-		predicates = append(predicates, messagerecords.ContentContains(*req.Content))
-	}
-	if req.SourceType != nil {
-		predicates = append(predicates, messagerecords.SourceTypeEQ(*req.SourceType))
-	}
-	if req.SourceId != nil {
-		predicates = append(predicates, messagerecords.SourceIDEQ(*req.SourceId))
+	if req.Status != nil {
+		predicates = append(predicates, messagerecords.StatusEQ(*req.Status))
 	}
 	data, err := l.svcCtx.DB.MessageRecords.Query().Where(predicates...).Page(l.ctx, req.Page, req.PageSize)
 

+ 1 - 5
internal/types/types.go

@@ -1055,11 +1055,7 @@ type MessageRecordsListReq struct {
 	// 接收方微信 id
 	ContactWxid *string `json:"contactWxid,optional"`
 	// 发送内容
-	Content *string `json:"content,optional"`
-	// 发送内容
-	SourceType *int `json:"sourceType,optional"`
-	// 发送内容
-	SourceId *uint64 `json:"sourceId,optional"`
+	Status *uint8 `json:"status,optional"`
 }
 
 // MessageRecords information response | MessageRecords信息返回体