Files
sundynix-micro-be/app/plant/api/internal/logic/ai/deleteaichathistorylogic.go
T
2026-05-23 13:55:05 +08:00

25 lines
718 B
Go

package ai
import (
"context"
"github.com/zeromicro/go-zero/core/logx"
"sundynix-micro-go/app/plant/api/internal/svc"
"sundynix-micro-go/app/plant/api/internal/types"
plantPb "sundynix-micro-go/app/plant/rpc/plant"
)
type DeleteAiChatHistoryLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
func NewDeleteAiChatHistoryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteAiChatHistoryLogic {
return &DeleteAiChatHistoryLogic{Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx}
}
func (l *DeleteAiChatHistoryLogic) DeleteAiChatHistory(req *types.IdsReq) error {
_, err := l.svcCtx.PlantRpc.DeleteAiChatHistory(l.ctx, &plantPb.IdsReq{Ids: req.Ids})
return err
}