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
+247 -43
View File
@@ -7,12 +7,13 @@
package wecom
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
@@ -534,6 +535,183 @@ func (x *DeleteUserReq) GetId() int64 {
return 0
}
// type: 1产品 2门店 3地址;before_data/after_data 为 JSON 字符串
type CreateReviewChangeReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
Type uint32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
BizId int64 `protobuf:"varint,2,opt,name=biz_id,json=bizId,proto3" json:"biz_id,omitempty"`
TaskId string `protobuf:"bytes,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"`
BeforeData string `protobuf:"bytes,4,opt,name=before_data,json=beforeData,proto3" json:"before_data,omitempty"`
AfterData string `protobuf:"bytes,5,opt,name=after_data,json=afterData,proto3" json:"after_data,omitempty"`
AdminId int64 `protobuf:"varint,6,opt,name=admin_id,json=adminId,proto3" json:"admin_id,omitempty"`
AdminName string `protobuf:"bytes,7,opt,name=admin_name,json=adminName,proto3" json:"admin_name,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *CreateReviewChangeReq) Reset() {
*x = CreateReviewChangeReq{}
mi := &file_wecom_wecom_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *CreateReviewChangeReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateReviewChangeReq) ProtoMessage() {}
func (x *CreateReviewChangeReq) ProtoReflect() protoreflect.Message {
mi := &file_wecom_wecom_proto_msgTypes[8]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateReviewChangeReq.ProtoReflect.Descriptor instead.
func (*CreateReviewChangeReq) Descriptor() ([]byte, []int) {
return file_wecom_wecom_proto_rawDescGZIP(), []int{8}
}
func (x *CreateReviewChangeReq) GetType() uint32 {
if x != nil {
return x.Type
}
return 0
}
func (x *CreateReviewChangeReq) GetBizId() int64 {
if x != nil {
return x.BizId
}
return 0
}
func (x *CreateReviewChangeReq) GetTaskId() string {
if x != nil {
return x.TaskId
}
return ""
}
func (x *CreateReviewChangeReq) GetBeforeData() string {
if x != nil {
return x.BeforeData
}
return ""
}
func (x *CreateReviewChangeReq) GetAfterData() string {
if x != nil {
return x.AfterData
}
return ""
}
func (x *CreateReviewChangeReq) GetAdminId() int64 {
if x != nil {
return x.AdminId
}
return 0
}
func (x *CreateReviewChangeReq) GetAdminName() string {
if x != nil {
return x.AdminName
}
return ""
}
type SendMessageReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
BizId int64 `protobuf:"varint,1,opt,name=biz_id,json=bizId,proto3" json:"biz_id,omitempty"`
BizType uint32 `protobuf:"varint,2,opt,name=biz_type,json=bizType,proto3" json:"biz_type,omitempty"`
Type uint32 `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"`
Action uint32 `protobuf:"varint,4,opt,name=action,proto3" json:"action,omitempty"`
Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"`
Key string `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SendMessageReq) Reset() {
*x = SendMessageReq{}
mi := &file_wecom_wecom_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SendMessageReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SendMessageReq) ProtoMessage() {}
func (x *SendMessageReq) ProtoReflect() protoreflect.Message {
mi := &file_wecom_wecom_proto_msgTypes[9]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SendMessageReq.ProtoReflect.Descriptor instead.
func (*SendMessageReq) Descriptor() ([]byte, []int) {
return file_wecom_wecom_proto_rawDescGZIP(), []int{9}
}
func (x *SendMessageReq) GetBizId() int64 {
if x != nil {
return x.BizId
}
return 0
}
func (x *SendMessageReq) GetBizType() uint32 {
if x != nil {
return x.BizType
}
return 0
}
func (x *SendMessageReq) GetType() uint32 {
if x != nil {
return x.Type
}
return 0
}
func (x *SendMessageReq) GetAction() uint32 {
if x != nil {
return x.Action
}
return 0
}
func (x *SendMessageReq) GetReason() string {
if x != nil {
return x.Reason
}
return ""
}
func (x *SendMessageReq) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
type Response struct {
state protoimpl.MessageState `protogen:"open.v1"`
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
@@ -545,7 +723,7 @@ type Response struct {
func (x *Response) Reset() {
*x = Response{}
mi := &file_wecom_wecom_proto_msgTypes[8]
mi := &file_wecom_wecom_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -557,7 +735,7 @@ func (x *Response) String() string {
func (*Response) ProtoMessage() {}
func (x *Response) ProtoReflect() protoreflect.Message {
mi := &file_wecom_wecom_proto_msgTypes[8]
mi := &file_wecom_wecom_proto_msgTypes[10]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -570,7 +748,7 @@ func (x *Response) ProtoReflect() protoreflect.Message {
// Deprecated: Use Response.ProtoReflect.Descriptor instead.
func (*Response) Descriptor() ([]byte, []int) {
return file_wecom_wecom_proto_rawDescGZIP(), []int{8}
return file_wecom_wecom_proto_rawDescGZIP(), []int{10}
}
func (x *Response) GetCode() int32 {
@@ -635,11 +813,29 @@ const file_wecom_wecom_proto_rawDesc = "" +
"\x02id\x18\x01 \x01(\x03R\x02id\x12\x16\n" +
"\x06status\x18\x02 \x01(\rR\x06status\"\x1f\n" +
"\rDeleteUserReq\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"D\n" +
"\x02id\x18\x01 \x01(\x03R\x02id\"\xd5\x01\n" +
"\x15CreateReviewChangeReq\x12\x12\n" +
"\x04type\x18\x01 \x01(\rR\x04type\x12\x15\n" +
"\x06biz_id\x18\x02 \x01(\x03R\x05bizId\x12\x17\n" +
"\atask_id\x18\x03 \x01(\tR\x06taskId\x12\x1f\n" +
"\vbefore_data\x18\x04 \x01(\tR\n" +
"beforeData\x12\x1d\n" +
"\n" +
"after_data\x18\x05 \x01(\tR\tafterData\x12\x19\n" +
"\badmin_id\x18\x06 \x01(\x03R\aadminId\x12\x1d\n" +
"\n" +
"admin_name\x18\a \x01(\tR\tadminName\"\x98\x01\n" +
"\x0eSendMessageReq\x12\x15\n" +
"\x06biz_id\x18\x01 \x01(\x03R\x05bizId\x12\x19\n" +
"\bbiz_type\x18\x02 \x01(\rR\abizType\x12\x12\n" +
"\x04type\x18\x03 \x01(\rR\x04type\x12\x16\n" +
"\x06action\x18\x04 \x01(\rR\x06action\x12\x16\n" +
"\x06reason\x18\x05 \x01(\tR\x06reason\x12\x10\n" +
"\x03key\x18\x06 \x01(\tR\x03key\"D\n" +
"\bResponse\x12\x12\n" +
"\x04code\x18\x01 \x01(\x05R\x04code\x12\x10\n" +
"\x03msg\x18\x02 \x01(\tR\x03msg\x12\x12\n" +
"\x04data\x18\x03 \x01(\tR\x04data2\x8c\x06\n" +
"\x04data\x18\x03 \x01(\tR\x04data2\x88\a\n" +
"\x05Wecom\x12S\n" +
"\n" +
"ItemsUsers\x12\x13.wecom.ItemsUserReq\x1a\x0f.wecom.Response\"\x1f\x82\xd3\xe4\x93\x02\x19:\x01*\x12\x14/admin/v3/wecom/user\x12T\n" +
@@ -655,7 +851,9 @@ const file_wecom_wecom_proto_rawDesc = "" +
"\x05Types\x12\x0f.wecom.EmptyReq\x1a\x0f.wecom.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\x12\x15/admin/v3/wecom/types\x12T\n" +
"\n" +
"CreateTags\x12\x14.wecom.CreateTagsReq\x1a\x0f.wecom.Response\"\x1f\x82\xd3\xe4\x93\x02\x19:\x01*\"\x14/admin/v3/wecom/tags\x12R\n" +
"\tItemsTags\x12\x13.wecom.ItemsTagsReq\x1a\x0f.wecom.Response\"\x1f\x82\xd3\xe4\x93\x02\x19:\x01*\x12\x14/admin/v3/wecom/tagsB\x19Z\x17lone-services/rpc/wecomb\x06proto3"
"\tItemsTags\x12\x13.wecom.ItemsTagsReq\x1a\x0f.wecom.Response\"\x1f\x82\xd3\xe4\x93\x02\x19:\x01*\x12\x14/admin/v3/wecom/tags\x12C\n" +
"\x12CreateReviewChange\x12\x1c.wecom.CreateReviewChangeReq\x1a\x0f.wecom.Response\x125\n" +
"\vSendMessage\x12\x15.wecom.SendMessageReq\x1a\x0f.wecom.ResponseB\x19Z\x17lone-services/rpc/wecomb\x06proto3"
var (
file_wecom_wecom_proto_rawDescOnce sync.Once
@@ -669,42 +867,48 @@ func file_wecom_wecom_proto_rawDescGZIP() []byte {
return file_wecom_wecom_proto_rawDescData
}
var file_wecom_wecom_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_wecom_wecom_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_wecom_wecom_proto_goTypes = []any{
(*EmptyReq)(nil), // 0: wecom.EmptyReq
(*CreateTagsReq)(nil), // 1: wecom.CreateTagsReq
(*ItemsTagsReq)(nil), // 2: wecom.ItemsTagsReq
(*ItemsUserReq)(nil), // 3: wecom.ItemsUserReq
(*CreateUserReq)(nil), // 4: wecom.CreateUserReq
(*UpdateUserReq)(nil), // 5: wecom.UpdateUserReq
(*StatusUserReq)(nil), // 6: wecom.StatusUserReq
(*DeleteUserReq)(nil), // 7: wecom.DeleteUserReq
(*Response)(nil), // 8: wecom.Response
(*EmptyReq)(nil), // 0: wecom.EmptyReq
(*CreateTagsReq)(nil), // 1: wecom.CreateTagsReq
(*ItemsTagsReq)(nil), // 2: wecom.ItemsTagsReq
(*ItemsUserReq)(nil), // 3: wecom.ItemsUserReq
(*CreateUserReq)(nil), // 4: wecom.CreateUserReq
(*UpdateUserReq)(nil), // 5: wecom.UpdateUserReq
(*StatusUserReq)(nil), // 6: wecom.StatusUserReq
(*DeleteUserReq)(nil), // 7: wecom.DeleteUserReq
(*CreateReviewChangeReq)(nil), // 8: wecom.CreateReviewChangeReq
(*SendMessageReq)(nil), // 9: wecom.SendMessageReq
(*Response)(nil), // 10: wecom.Response
}
var file_wecom_wecom_proto_depIdxs = []int32{
3, // 0: wecom.Wecom.ItemsUsers:input_type -> wecom.ItemsUserReq
4, // 1: wecom.Wecom.CreateUser:input_type -> wecom.CreateUserReq
5, // 2: wecom.Wecom.UpdateUser:input_type -> wecom.UpdateUserReq
6, // 3: wecom.Wecom.StatusUser:input_type -> wecom.StatusUserReq
7, // 4: wecom.Wecom.DeleteUser:input_type -> wecom.DeleteUserReq
0, // 5: wecom.Wecom.ItemsAgents:input_type -> wecom.EmptyReq
0, // 6: wecom.Wecom.Types:input_type -> wecom.EmptyReq
1, // 7: wecom.Wecom.CreateTags:input_type -> wecom.CreateTagsReq
2, // 8: wecom.Wecom.ItemsTags:input_type -> wecom.ItemsTagsReq
8, // 9: wecom.Wecom.ItemsUsers:output_type -> wecom.Response
8, // 10: wecom.Wecom.CreateUser:output_type -> wecom.Response
8, // 11: wecom.Wecom.UpdateUser:output_type -> wecom.Response
8, // 12: wecom.Wecom.StatusUser:output_type -> wecom.Response
8, // 13: wecom.Wecom.DeleteUser:output_type -> wecom.Response
8, // 14: wecom.Wecom.ItemsAgents:output_type -> wecom.Response
8, // 15: wecom.Wecom.Types:output_type -> wecom.Response
8, // 16: wecom.Wecom.CreateTags:output_type -> wecom.Response
8, // 17: wecom.Wecom.ItemsTags:output_type -> wecom.Response
9, // [9:18] is the sub-list for method output_type
0, // [0:9] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
3, // 0: wecom.Wecom.ItemsUsers:input_type -> wecom.ItemsUserReq
4, // 1: wecom.Wecom.CreateUser:input_type -> wecom.CreateUserReq
5, // 2: wecom.Wecom.UpdateUser:input_type -> wecom.UpdateUserReq
6, // 3: wecom.Wecom.StatusUser:input_type -> wecom.StatusUserReq
7, // 4: wecom.Wecom.DeleteUser:input_type -> wecom.DeleteUserReq
0, // 5: wecom.Wecom.ItemsAgents:input_type -> wecom.EmptyReq
0, // 6: wecom.Wecom.Types:input_type -> wecom.EmptyReq
1, // 7: wecom.Wecom.CreateTags:input_type -> wecom.CreateTagsReq
2, // 8: wecom.Wecom.ItemsTags:input_type -> wecom.ItemsTagsReq
8, // 9: wecom.Wecom.CreateReviewChange:input_type -> wecom.CreateReviewChangeReq
9, // 10: wecom.Wecom.SendMessage:input_type -> wecom.SendMessageReq
10, // 11: wecom.Wecom.ItemsUsers:output_type -> wecom.Response
10, // 12: wecom.Wecom.CreateUser:output_type -> wecom.Response
10, // 13: wecom.Wecom.UpdateUser:output_type -> wecom.Response
10, // 14: wecom.Wecom.StatusUser:output_type -> wecom.Response
10, // 15: wecom.Wecom.DeleteUser:output_type -> wecom.Response
10, // 16: wecom.Wecom.ItemsAgents:output_type -> wecom.Response
10, // 17: wecom.Wecom.Types:output_type -> wecom.Response
10, // 18: wecom.Wecom.CreateTags:output_type -> wecom.Response
10, // 19: wecom.Wecom.ItemsTags:output_type -> wecom.Response
10, // 20: wecom.Wecom.CreateReviewChange:output_type -> wecom.Response
10, // 21: wecom.Wecom.SendMessage:output_type -> wecom.Response
11, // [11:22] is the sub-list for method output_type
0, // [0:11] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_wecom_wecom_proto_init() }
@@ -718,7 +922,7 @@ func file_wecom_wecom_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_wecom_wecom_proto_rawDesc), len(file_wecom_wecom_proto_rawDesc)),
NumEnums: 0,
NumMessages: 9,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},
+89 -9
View File
@@ -19,15 +19,17 @@ import (
const _ = grpc.SupportPackageIsVersion9
const (
Wecom_ItemsUsers_FullMethodName = "/wecom.Wecom/ItemsUsers"
Wecom_CreateUser_FullMethodName = "/wecom.Wecom/CreateUser"
Wecom_UpdateUser_FullMethodName = "/wecom.Wecom/UpdateUser"
Wecom_StatusUser_FullMethodName = "/wecom.Wecom/StatusUser"
Wecom_DeleteUser_FullMethodName = "/wecom.Wecom/DeleteUser"
Wecom_ItemsAgents_FullMethodName = "/wecom.Wecom/ItemsAgents"
Wecom_Types_FullMethodName = "/wecom.Wecom/Types"
Wecom_CreateTags_FullMethodName = "/wecom.Wecom/CreateTags"
Wecom_ItemsTags_FullMethodName = "/wecom.Wecom/ItemsTags"
Wecom_ItemsUsers_FullMethodName = "/wecom.Wecom/ItemsUsers"
Wecom_CreateUser_FullMethodName = "/wecom.Wecom/CreateUser"
Wecom_UpdateUser_FullMethodName = "/wecom.Wecom/UpdateUser"
Wecom_StatusUser_FullMethodName = "/wecom.Wecom/StatusUser"
Wecom_DeleteUser_FullMethodName = "/wecom.Wecom/DeleteUser"
Wecom_ItemsAgents_FullMethodName = "/wecom.Wecom/ItemsAgents"
Wecom_Types_FullMethodName = "/wecom.Wecom/Types"
Wecom_CreateTags_FullMethodName = "/wecom.Wecom/CreateTags"
Wecom_ItemsTags_FullMethodName = "/wecom.Wecom/ItemsTags"
Wecom_CreateReviewChange_FullMethodName = "/wecom.Wecom/CreateReviewChange"
Wecom_SendMessage_FullMethodName = "/wecom.Wecom/SendMessage"
)
// WecomClient is the client API for Wecom service.
@@ -43,6 +45,10 @@ type WecomClient interface {
Types(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*Response, error)
CreateTags(ctx context.Context, in *CreateTagsReq, opts ...grpc.CallOption) (*Response, error)
ItemsTags(ctx context.Context, in *ItemsTagsReq, opts ...grpc.CallOption) (*Response, error)
// 内部接口:产品/门店/地址新增或修改时写入审核变更快照
CreateReviewChange(ctx context.Context, in *CreateReviewChangeReq, opts ...grpc.CallOption) (*Response, error)
// 内部接口:发送企微审核/通知消息
SendMessage(ctx context.Context, in *SendMessageReq, opts ...grpc.CallOption) (*Response, error)
}
type wecomClient struct {
@@ -143,6 +149,26 @@ func (c *wecomClient) ItemsTags(ctx context.Context, in *ItemsTagsReq, opts ...g
return out, nil
}
func (c *wecomClient) CreateReviewChange(ctx context.Context, in *CreateReviewChangeReq, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, Wecom_CreateReviewChange_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *wecomClient) SendMessage(ctx context.Context, in *SendMessageReq, opts ...grpc.CallOption) (*Response, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(Response)
err := c.cc.Invoke(ctx, Wecom_SendMessage_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// WecomServer is the server API for Wecom service.
// All implementations must embed UnimplementedWecomServer
// for forward compatibility.
@@ -156,6 +182,10 @@ type WecomServer interface {
Types(context.Context, *EmptyReq) (*Response, error)
CreateTags(context.Context, *CreateTagsReq) (*Response, error)
ItemsTags(context.Context, *ItemsTagsReq) (*Response, error)
// 内部接口:产品/门店/地址新增或修改时写入审核变更快照
CreateReviewChange(context.Context, *CreateReviewChangeReq) (*Response, error)
// 内部接口:发送企微审核/通知消息
SendMessage(context.Context, *SendMessageReq) (*Response, error)
mustEmbedUnimplementedWecomServer()
}
@@ -193,6 +223,12 @@ func (UnimplementedWecomServer) CreateTags(context.Context, *CreateTagsReq) (*Re
func (UnimplementedWecomServer) ItemsTags(context.Context, *ItemsTagsReq) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method ItemsTags not implemented")
}
func (UnimplementedWecomServer) CreateReviewChange(context.Context, *CreateReviewChangeReq) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method CreateReviewChange not implemented")
}
func (UnimplementedWecomServer) SendMessage(context.Context, *SendMessageReq) (*Response, error) {
return nil, status.Error(codes.Unimplemented, "method SendMessage not implemented")
}
func (UnimplementedWecomServer) mustEmbedUnimplementedWecomServer() {}
func (UnimplementedWecomServer) testEmbeddedByValue() {}
@@ -376,6 +412,42 @@ func _Wecom_ItemsTags_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler)
}
func _Wecom_CreateReviewChange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateReviewChangeReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WecomServer).CreateReviewChange(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Wecom_CreateReviewChange_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WecomServer).CreateReviewChange(ctx, req.(*CreateReviewChangeReq))
}
return interceptor(ctx, in, info, handler)
}
func _Wecom_SendMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SendMessageReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WecomServer).SendMessage(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Wecom_SendMessage_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WecomServer).SendMessage(ctx, req.(*SendMessageReq))
}
return interceptor(ctx, in, info, handler)
}
// Wecom_ServiceDesc is the grpc.ServiceDesc for Wecom service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -419,6 +491,14 @@ var Wecom_ServiceDesc = grpc.ServiceDesc{
MethodName: "ItemsTags",
Handler: _Wecom_ItemsTags_Handler,
},
{
MethodName: "CreateReviewChange",
Handler: _Wecom_CreateReviewChange_Handler,
},
{
MethodName: "SendMessage",
Handler: _Wecom_SendMessage_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "wecom/wecom.proto",
Binary file not shown.
+24
View File
@@ -63,6 +63,9 @@ service Wecom {
body: "*"
};
}
rpc CreateReviewChange(CreateReviewChangeReq) returns (Response);
rpc SendMessage(SendMessageReq) returns (Response);
}
message EmptyReq {}
@@ -116,6 +119,27 @@ message DeleteUserReq {
int64 id = 1;
}
// type: 1产品 2门店 3地址;before_data/after_data 为 JSON 字符串
message CreateReviewChangeReq {
uint32 type = 1;
int64 biz_id = 2;
string task_id = 3;
string before_data = 4;
string after_data = 5;
int64 admin_id = 6;
string admin_name = 7;
}
// biz_type: 1产品 2门店 3地址 4销售;type: 消息场景;action: 0未用 1通过 2拒绝
message SendMessageReq {
int64 biz_id = 1;
uint32 biz_type = 2;
uint32 type = 3;
uint32 action = 4;
string reason = 5;
string key = 6;
}
message Response {
int32 code = 1;
string msg = 2;