package whatsapp import ( "context" "wechat-api/hook/aliyun" "wechat-api/internal/svc" "wechat-api/internal/types" "github.com/zeromicro/go-zero/core/logx" ) type GetConversationalAutomationLogic struct { logx.Logger ctx context.Context svcCtx *svc.ServiceContext } func NewGetConversationalAutomationLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetConversationalAutomationLogic { return &GetConversationalAutomationLogic{ Logger: logx.WithContext(ctx), ctx: ctx, svcCtx: svcCtx} } func (l *GetConversationalAutomationLogic) GetConversationalAutomation(req *types.ConversationalAutomationReq) (*types.ConversationalAutomationResp, error) { phone := *req.Cc + *req.Phone response, err := aliyun.GetConversationalAutomation(*req.WaId, phone) resp := types.ConversationalAutomationResp{} if err == nil && *response.Body.Code == "OK" { //resp.Data.Commands = response.Body.Data.Commands } return &resp, nil }