发送短信时加入验证码(code)参数

This commit is contained in:
刘祥超
2023-11-17 15:00:11 +08:00
parent c6e95eda15
commit 826bf7bf7d
3 changed files with 33 additions and 23 deletions

View File

@@ -21319,7 +21319,7 @@
},
{
"name": "SendSMSRequest",
"code": "message SendSMSRequest {\n\tstring mobile = 1; // 手机号\n\tstring body = 2; // 内容\n\tstring type = 3; // 渠道类型webHook ...\n\tbytes paramsJSON = 4; // 参数\n}",
"code": "message SendSMSRequest {\n\tstring mobile = 1; // 手机号\n\tstring body = 2; // 内容\n\tstring code = 3; // 验证码\n\tstring type = 4; // 渠道类型webHook ...\n\tbytes paramsJSON = 5; // 参数\n}",
"doc": "发送短信"
},
{

View File

@@ -28,8 +28,9 @@ type SendSMSRequest struct {
Mobile string `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"` // 手机号
Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` // 内容
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` // 渠道类型webHook ...
ParamsJSON []byte `protobuf:"bytes,4,opt,name=paramsJSON,proto3" json:"paramsJSON,omitempty"` // 参数
Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` // 验证码
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // 渠道类型webHook ...
ParamsJSON []byte `protobuf:"bytes,5,opt,name=paramsJSON,proto3" json:"paramsJSON,omitempty"` // 参数
}
func (x *SendSMSRequest) Reset() {
@@ -78,6 +79,13 @@ func (x *SendSMSRequest) GetBody() string {
return ""
}
func (x *SendSMSRequest) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *SendSMSRequest) GetType() string {
if x != nil {
return x.Type
@@ -151,24 +159,25 @@ var File_service_sms_sender_proto protoreflect.FileDescriptor
var file_service_sms_sender_proto_rawDesc = []byte{
0x0a, 0x18, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x6d, 0x73, 0x5f, 0x73, 0x65,
0x6e, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x70,
0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x4d, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x12, 0x0a, 0x04,
0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4a, 0x53, 0x4f, 0x4e,
0x22, 0x3d, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x4d, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28,
0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c,
0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x32,
0x46, 0x0a, 0x10, 0x53, 0x4d, 0x53, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x73, 0x65, 0x6e, 0x64, 0x53, 0x4d, 0x53, 0x12, 0x12,
0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x4d, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x4d, 0x53, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x6e, 0x64, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x84,
0x01, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x4d, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x06, 0x6d, 0x6f, 0x62, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64,
0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x12, 0x0a,
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64,
0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4a,
0x53, 0x4f, 0x4e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d,
0x73, 0x4a, 0x53, 0x4f, 0x4e, 0x22, 0x3d, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x4d, 0x53,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6b,
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x12, 0x16, 0x0a, 0x06,
0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65,
0x73, 0x75, 0x6c, 0x74, 0x32, 0x46, 0x0a, 0x10, 0x53, 0x4d, 0x53, 0x53, 0x65, 0x6e, 0x64, 0x65,
0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x73, 0x65, 0x6e, 0x64,
0x53, 0x4d, 0x53, 0x12, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x53, 0x4d, 0x53,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x62, 0x2e, 0x53, 0x65, 0x6e,
0x64, 0x53, 0x4d, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -13,8 +13,9 @@ service SMSSenderService {
message SendSMSRequest {
string mobile = 1; // 手机号
string body = 2; // 内容
string type = 3; // 渠道类型webHook ...
bytes paramsJSON = 4; // 参数
string code = 3; // 验证码
string type = 4; // 渠道类型webHook ...
bytes paramsJSON = 5; // 参数
}
message SendSMSResponse {