feat: completed development wecom message

This commit is contained in:
zzw
2026-09-18 17:39:48 +08:00
parent dd460f6be2
commit 1ca44d25df
57 changed files with 1754 additions and 1412 deletions
+28
View File
@@ -0,0 +1,28 @@
package wecomrpc
import (
"context"
"fmt"
"lone-services/pkg/rpcclient"
"lone-services/pkg/utils"
wecompb "lone-services/rpc/wecom/pb"
)
func getClient(wecomSvcName string) (wecompb.WecomClient, error) {
if wecomSvcName == utils.StringEmpty {
return nil, fmt.Errorf("services.wecom empty")
}
cli, err := rpcclient.Get(wecomSvcName)
if err != nil {
return nil, err
}
return wecompb.NewWecomClient(cli.Conn()), nil
}
func ensureCtx(ctx context.Context) context.Context {
if ctx == nil {
return context.Background()
}
return ctx
}