feat: wecom message init

This commit is contained in:
zzw
2026-09-17 10:18:43 +08:00
parent 5a56eb2fe4
commit dd460f6be2
46 changed files with 2735 additions and 109 deletions
+171 -38
View File
@@ -7,12 +7,13 @@
package chore
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 (
@@ -742,6 +743,124 @@ func (x *SendSmsReq) GetScene() int32 {
return 0
}
type InternalActionApplyLogCreateReq struct {
state protoimpl.MessageState `protogen:"open.v1"`
AdminId int64 `protobuf:"varint,1,opt,name=admin_id,json=adminId,proto3" json:"admin_id,omitempty"`
ObjId int64 `protobuf:"varint,2,opt,name=obj_id,json=objId,proto3" json:"obj_id,omitempty"`
Type uint32 `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"` // 1产品 2门店
Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"`
Status uint32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` // 1通过 2驳回 9待审核
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *InternalActionApplyLogCreateReq) Reset() {
*x = InternalActionApplyLogCreateReq{}
mi := &file_chore_chore_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *InternalActionApplyLogCreateReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InternalActionApplyLogCreateReq) ProtoMessage() {}
func (x *InternalActionApplyLogCreateReq) ProtoReflect() protoreflect.Message {
mi := &file_chore_chore_proto_msgTypes[14]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*InternalActionApplyLogCreateReq) Descriptor() ([]byte, []int) {
return file_chore_chore_proto_rawDescGZIP(), []int{14}
}
func (x *InternalActionApplyLogCreateReq) GetAdminId() int64 {
if x != nil {
return x.AdminId
}
return 0
}
func (x *InternalActionApplyLogCreateReq) GetObjId() int64 {
if x != nil {
return x.ObjId
}
return 0
}
func (x *InternalActionApplyLogCreateReq) GetType() uint32 {
if x != nil {
return x.Type
}
return 0
}
func (x *InternalActionApplyLogCreateReq) GetReason() string {
if x != nil {
return x.Reason
}
return ""
}
func (x *InternalActionApplyLogCreateReq) GetStatus() uint32 {
if x != nil {
return x.Status
}
return 0
}
type InternalActionApplyLogCreateData struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *InternalActionApplyLogCreateData) Reset() {
*x = InternalActionApplyLogCreateData{}
mi := &file_chore_chore_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *InternalActionApplyLogCreateData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InternalActionApplyLogCreateData) ProtoMessage() {}
func (x *InternalActionApplyLogCreateData) ProtoReflect() protoreflect.Message {
mi := &file_chore_chore_proto_msgTypes[15]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
func (*InternalActionApplyLogCreateData) Descriptor() ([]byte, []int) {
return file_chore_chore_proto_rawDescGZIP(), []int{15}
}
func (x *InternalActionApplyLogCreateData) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
var File_chore_chore_proto protoreflect.FileDescriptor
const file_chore_chore_proto_rawDesc = "" +
@@ -791,7 +910,16 @@ const file_chore_chore_proto_rawDesc = "" +
"\n" +
"SendSmsReq\x12\x16\n" +
"\x06mobile\x18\x01 \x01(\tR\x06mobile\x12\x14\n" +
"\x05scene\x18\x02 \x01(\x05R\x05scene2\xe9\t\n" +
"\x05scene\x18\x02 \x01(\x05R\x05scene\"\x97\x01\n" +
"\x1fInternalActionApplyLogCreateReq\x12\x19\n" +
"\badmin_id\x18\x01 \x01(\x03R\aadminId\x12\x15\n" +
"\x06obj_id\x18\x02 \x01(\x03R\x05objId\x12\x12\n" +
"\x04type\x18\x03 \x01(\rR\x04type\x12\x16\n" +
"\x06reason\x18\x04 \x01(\tR\x06reason\x12\x16\n" +
"\x06status\x18\x05 \x01(\rR\x06status\"2\n" +
" InternalActionApplyLogCreateData\x12\x0e\n" +
"\x02id\x18\x01 \x01(\x03R\x02id2\xda\n" +
"\n" +
"\x05Chore\x12P\n" +
"\x06Policy\x12\x10.chore.PolicyReq\x1a\x0f.chore.Response\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\x12\x18/api/v3/chore/oss/policy\x12F\n" +
"\x04Test\x12\x0e.chore.TestReq\x1a\x0f.chore.Response\"\x1d\x82\xd3\xe4\x93\x02\x17:\x01*\"\x12/api/v3/chore/test\x12_\n" +
@@ -811,7 +939,8 @@ const file_chore_chore_proto_rawDesc = "" +
"\n" +
"SystemInfo\x12\f.chore.IdReq\x1a\x0f.chore.Response\"#\x82\xd3\xe4\x93\x02\x1d\x12\x1b/admin/v3/chore/system/info\x12U\n" +
"\vSystemItems\x12\x0f.chore.EmptyReq\x1a\x0f.chore.Response\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/admin/v3/chore/system/items\x12?\n" +
"\fRegionsByIds\x12\x16.chore.RegionsByIdsReq\x1a\x17.chore.RegionsByIdsDataB\x19Z\x17lone-services/rpc/choreb\x06proto3"
"\fRegionsByIds\x12\x16.chore.RegionsByIdsReq\x1a\x17.chore.RegionsByIdsData\x12o\n" +
"\x1cInternalActionApplyLogCreate\x12&.chore.InternalActionApplyLogCreateReq\x1a'.chore.InternalActionApplyLogCreateDataB\x19Z\x17lone-services/rpc/choreb\x06proto3"
var (
file_chore_chore_proto_rawDescOnce sync.Once
@@ -825,22 +954,24 @@ func file_chore_chore_proto_rawDescGZIP() []byte {
return file_chore_chore_proto_rawDescData
}
var file_chore_chore_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
var file_chore_chore_proto_msgTypes = make([]protoimpl.MessageInfo, 16)
var file_chore_chore_proto_goTypes = []any{
(*Response)(nil), // 0: chore.Response
(*EmptyReq)(nil), // 1: chore.EmptyReq
(*IdReq)(nil), // 2: chore.IdReq
(*StatusReq)(nil), // 3: chore.StatusReq
(*EditReq)(nil), // 4: chore.EditReq
(*SystemEditReq)(nil), // 5: chore.SystemEditReq
(*PolicyReq)(nil), // 6: chore.PolicyReq
(*TestReq)(nil), // 7: chore.TestReq
(*DecryptMobileReq)(nil), // 8: chore.DecryptMobileReq
(*RegionsReq)(nil), // 9: chore.RegionsReq
(*RegionsByIdsReq)(nil), // 10: chore.RegionsByIdsReq
(*RegionItem)(nil), // 11: chore.RegionItem
(*RegionsByIdsData)(nil), // 12: chore.RegionsByIdsData
(*SendSmsReq)(nil), // 13: chore.SendSmsReq
(*Response)(nil), // 0: chore.Response
(*EmptyReq)(nil), // 1: chore.EmptyReq
(*IdReq)(nil), // 2: chore.IdReq
(*StatusReq)(nil), // 3: chore.StatusReq
(*EditReq)(nil), // 4: chore.EditReq
(*SystemEditReq)(nil), // 5: chore.SystemEditReq
(*PolicyReq)(nil), // 6: chore.PolicyReq
(*TestReq)(nil), // 7: chore.TestReq
(*DecryptMobileReq)(nil), // 8: chore.DecryptMobileReq
(*RegionsReq)(nil), // 9: chore.RegionsReq
(*RegionsByIdsReq)(nil), // 10: chore.RegionsByIdsReq
(*RegionItem)(nil), // 11: chore.RegionItem
(*RegionsByIdsData)(nil), // 12: chore.RegionsByIdsData
(*SendSmsReq)(nil), // 13: chore.SendSmsReq
(*InternalActionApplyLogCreateReq)(nil), // 14: chore.InternalActionApplyLogCreateReq
(*InternalActionApplyLogCreateData)(nil), // 15: chore.InternalActionApplyLogCreateData
}
var file_chore_chore_proto_depIdxs = []int32{
11, // 0: chore.RegionsByIdsData.items:type_name -> chore.RegionItem
@@ -859,23 +990,25 @@ var file_chore_chore_proto_depIdxs = []int32{
2, // 13: chore.Chore.SystemInfo:input_type -> chore.IdReq
1, // 14: chore.Chore.SystemItems:input_type -> chore.EmptyReq
10, // 15: chore.Chore.RegionsByIds:input_type -> chore.RegionsByIdsReq
0, // 16: chore.Chore.Policy:output_type -> chore.Response
0, // 17: chore.Chore.Test:output_type -> chore.Response
0, // 18: chore.Chore.DecryptMobile:output_type -> chore.Response
0, // 19: chore.Chore.Regions:output_type -> chore.Response
0, // 20: chore.Chore.SendSms:output_type -> chore.Response
0, // 21: chore.Chore.AnswerItems:output_type -> chore.Response
0, // 22: chore.Chore.AnswerStatus:output_type -> chore.Response
0, // 23: chore.Chore.AnswerInfo:output_type -> chore.Response
0, // 24: chore.Chore.AnswerCreate:output_type -> chore.Response
0, // 25: chore.Chore.AnswerEdit:output_type -> chore.Response
0, // 26: chore.Chore.SystemEdit:output_type -> chore.Response
0, // 27: chore.Chore.SystemStatus:output_type -> chore.Response
0, // 28: chore.Chore.SystemInfo:output_type -> chore.Response
0, // 29: chore.Chore.SystemItems:output_type -> chore.Response
12, // 30: chore.Chore.RegionsByIds:output_type -> chore.RegionsByIdsData
16, // [16:31] is the sub-list for method output_type
1, // [1:16] is the sub-list for method input_type
14, // 16: chore.Chore.InternalActionApplyLogCreate:input_type -> chore.InternalActionApplyLogCreateReq
0, // 17: chore.Chore.Policy:output_type -> chore.Response
0, // 18: chore.Chore.Test:output_type -> chore.Response
0, // 19: chore.Chore.DecryptMobile:output_type -> chore.Response
0, // 20: chore.Chore.Regions:output_type -> chore.Response
0, // 21: chore.Chore.SendSms:output_type -> chore.Response
0, // 22: chore.Chore.AnswerItems:output_type -> chore.Response
0, // 23: chore.Chore.AnswerStatus:output_type -> chore.Response
0, // 24: chore.Chore.AnswerInfo:output_type -> chore.Response
0, // 25: chore.Chore.AnswerCreate:output_type -> chore.Response
0, // 26: chore.Chore.AnswerEdit:output_type -> chore.Response
0, // 27: chore.Chore.SystemEdit:output_type -> chore.Response
0, // 28: chore.Chore.SystemStatus:output_type -> chore.Response
0, // 29: chore.Chore.SystemInfo:output_type -> chore.Response
0, // 30: chore.Chore.SystemItems:output_type -> chore.Response
12, // 31: chore.Chore.RegionsByIds:output_type -> chore.RegionsByIdsData
15, // 32: chore.Chore.InternalActionApplyLogCreate:output_type -> chore.InternalActionApplyLogCreateData
17, // [17:33] is the sub-list for method output_type
1, // [1:17] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
@@ -892,7 +1025,7 @@ func file_chore_chore_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_chore_chore_proto_rawDesc), len(file_chore_chore_proto_rawDesc)),
NumEnums: 0,
NumMessages: 14,
NumMessages: 16,
NumExtensions: 0,
NumServices: 1,
},
+55 -15
View File
@@ -19,21 +19,22 @@ import (
const _ = grpc.SupportPackageIsVersion9
const (
Chore_Policy_FullMethodName = "/chore.Chore/Policy"
Chore_Test_FullMethodName = "/chore.Chore/Test"
Chore_DecryptMobile_FullMethodName = "/chore.Chore/DecryptMobile"
Chore_Regions_FullMethodName = "/chore.Chore/Regions"
Chore_SendSms_FullMethodName = "/chore.Chore/SendSms"
Chore_AnswerItems_FullMethodName = "/chore.Chore/AnswerItems"
Chore_AnswerStatus_FullMethodName = "/chore.Chore/AnswerStatus"
Chore_AnswerInfo_FullMethodName = "/chore.Chore/AnswerInfo"
Chore_AnswerCreate_FullMethodName = "/chore.Chore/AnswerCreate"
Chore_AnswerEdit_FullMethodName = "/chore.Chore/AnswerEdit"
Chore_SystemEdit_FullMethodName = "/chore.Chore/SystemEdit"
Chore_SystemStatus_FullMethodName = "/chore.Chore/SystemStatus"
Chore_SystemInfo_FullMethodName = "/chore.Chore/SystemInfo"
Chore_SystemItems_FullMethodName = "/chore.Chore/SystemItems"
Chore_RegionsByIds_FullMethodName = "/chore.Chore/RegionsByIds"
Chore_Policy_FullMethodName = "/chore.Chore/Policy"
Chore_Test_FullMethodName = "/chore.Chore/Test"
Chore_DecryptMobile_FullMethodName = "/chore.Chore/DecryptMobile"
Chore_Regions_FullMethodName = "/chore.Chore/Regions"
Chore_SendSms_FullMethodName = "/chore.Chore/SendSms"
Chore_AnswerItems_FullMethodName = "/chore.Chore/AnswerItems"
Chore_AnswerStatus_FullMethodName = "/chore.Chore/AnswerStatus"
Chore_AnswerInfo_FullMethodName = "/chore.Chore/AnswerInfo"
Chore_AnswerCreate_FullMethodName = "/chore.Chore/AnswerCreate"
Chore_AnswerEdit_FullMethodName = "/chore.Chore/AnswerEdit"
Chore_SystemEdit_FullMethodName = "/chore.Chore/SystemEdit"
Chore_SystemStatus_FullMethodName = "/chore.Chore/SystemStatus"
Chore_SystemInfo_FullMethodName = "/chore.Chore/SystemInfo"
Chore_SystemItems_FullMethodName = "/chore.Chore/SystemItems"
Chore_RegionsByIds_FullMethodName = "/chore.Chore/RegionsByIds"
Chore_InternalActionApplyLogCreate_FullMethodName = "/chore.Chore/InternalActionApplyLogCreate"
)
// ChoreClient is the client API for Chore service.
@@ -56,6 +57,8 @@ type ChoreClient interface {
SystemItems(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*Response, error)
// 按 id 批量查地区名称
RegionsByIds(ctx context.Context, in *RegionsByIdsReq, opts ...grpc.CallOption) (*RegionsByIdsData, error)
// 服务间:写入编辑申请日志
InternalActionApplyLogCreate(ctx context.Context, in *InternalActionApplyLogCreateReq, opts ...grpc.CallOption) (*InternalActionApplyLogCreateData, error)
}
type choreClient struct {
@@ -216,6 +219,16 @@ func (c *choreClient) RegionsByIds(ctx context.Context, in *RegionsByIdsReq, opt
return out, nil
}
func (c *choreClient) InternalActionApplyLogCreate(ctx context.Context, in *InternalActionApplyLogCreateReq, opts ...grpc.CallOption) (*InternalActionApplyLogCreateData, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(InternalActionApplyLogCreateData)
err := c.cc.Invoke(ctx, Chore_InternalActionApplyLogCreate_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// ChoreServer is the server API for Chore service.
// All implementations must embed UnimplementedChoreServer
// for forward compatibility.
@@ -236,6 +249,8 @@ type ChoreServer interface {
SystemItems(context.Context, *EmptyReq) (*Response, error)
// 按 id 批量查地区名称
RegionsByIds(context.Context, *RegionsByIdsReq) (*RegionsByIdsData, error)
// 服务间:写入编辑申请日志
InternalActionApplyLogCreate(context.Context, *InternalActionApplyLogCreateReq) (*InternalActionApplyLogCreateData, error)
mustEmbedUnimplementedChoreServer()
}
@@ -291,6 +306,9 @@ func (UnimplementedChoreServer) SystemItems(context.Context, *EmptyReq) (*Respon
func (UnimplementedChoreServer) RegionsByIds(context.Context, *RegionsByIdsReq) (*RegionsByIdsData, error) {
return nil, status.Error(codes.Unimplemented, "method RegionsByIds not implemented")
}
func (UnimplementedChoreServer) InternalActionApplyLogCreate(context.Context, *InternalActionApplyLogCreateReq) (*InternalActionApplyLogCreateData, error) {
return nil, status.Error(codes.Unimplemented, "method InternalActionApplyLogCreate not implemented")
}
func (UnimplementedChoreServer) mustEmbedUnimplementedChoreServer() {}
func (UnimplementedChoreServer) testEmbeddedByValue() {}
@@ -582,6 +600,24 @@ func _Chore_RegionsByIds_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler)
}
func _Chore_InternalActionApplyLogCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InternalActionApplyLogCreateReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ChoreServer).InternalActionApplyLogCreate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Chore_InternalActionApplyLogCreate_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ChoreServer).InternalActionApplyLogCreate(ctx, req.(*InternalActionApplyLogCreateReq))
}
return interceptor(ctx, in, info, handler)
}
// Chore_ServiceDesc is the grpc.ServiceDesc for Chore service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -649,6 +685,10 @@ var Chore_ServiceDesc = grpc.ServiceDesc{
MethodName: "RegionsByIds",
Handler: _Chore_RegionsByIds_Handler,
},
{
MethodName: "InternalActionApplyLogCreate",
Handler: _Chore_InternalActionApplyLogCreate_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "chore/chore.proto",