Commit 70b91186 by Li Feifei

debug

parent 25816068
File added
...@@ -1894,3 +1894,33 @@ ...@@ -1894,3 +1894,33 @@
{"level":"info","ts":"2020-07-10T18:21:44.345+0800","caller":"grpclog/grpclog.go:33","msg":"Channel Connectivity change to READY","system":"grpc","grpc_log":true} {"level":"info","ts":"2020-07-10T18:21:44.345+0800","caller":"grpclog/grpclog.go:33","msg":"Channel Connectivity change to READY","system":"grpc","grpc_log":true}
{"level":"info","ts":"2020-07-10T18:21:44.345+0800","caller":"grpclog/grpclog.go:33","msg":"Subchannel Connectivity change to READY","system":"grpc","grpc_log":true} {"level":"info","ts":"2020-07-10T18:21:44.345+0800","caller":"grpclog/grpclog.go:33","msg":"Subchannel Connectivity change to READY","system":"grpc","grpc_log":true}
{"level":"info","ts":"2020-07-10T18:21:44.345+0800","caller":"grpclog/grpclog.go:33","msg":"Channel Connectivity change to READY","system":"grpc","grpc_log":true} {"level":"info","ts":"2020-07-10T18:21:44.345+0800","caller":"grpclog/grpclog.go:33","msg":"Channel Connectivity change to READY","system":"grpc","grpc_log":true}
{"level":"info","ts":"2020-07-15T15:43:34.216+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-15T15:43:34+08:00","grpc.request.deadline":"2020-07-15T15:43:39+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Select","grpc.code":"OK","grpc.time_ms":24.486000061035156}
{"level":"info","ts":"2020-07-15T15:44:45.122+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-15T15:44:45+08:00","grpc.request.deadline":"2020-07-15T15:44:50+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Select","grpc.code":"OK","grpc.time_ms":17.04800033569336}
{"level":"info","ts":"2020-07-15T16:18:05.690+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-15T16:18:05+08:00","grpc.request.deadline":"2020-07-15T16:18:10+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Select","grpc.code":"OK","grpc.time_ms":11.442000389099121}
{"level":"info","ts":"2020-07-15T16:18:08.572+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-15T16:18:08+08:00","grpc.request.deadline":"2020-07-15T16:18:13+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Select","grpc.code":"OK","grpc.time_ms":7.533999919891357}
{"level":"info","ts":"2020-07-15T16:58:37.655+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-15T16:58:37+08:00","grpc.request.deadline":"2020-07-15T16:58:42+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Select","grpc.code":"OK","grpc.time_ms":18.381000518798828}
{"level":"error","ts":"2020-07-15T17:02:11.467+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code Unknown","grpc.start_time":"2020-07-15T17:02:11+08:00","grpc.request.deadline":"2020-07-15T17:02:16+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Add","error":"appid不存在","grpc.code":"Unknown","grpc.time_ms":25.8700008392334}
{"level":"info","ts":"2020-07-15T17:02:30.812+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-15T17:02:30+08:00","grpc.request.deadline":"2020-07-15T17:02:35+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Add","grpc.code":"OK","grpc.time_ms":43.698001861572266}
{"level":"info","ts":"2020-07-15T17:16:34.874+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-15T17:16:34+08:00","grpc.request.deadline":"2020-07-15T17:16:39+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Select","grpc.code":"OK","grpc.time_ms":6.061999797821045}
{"level":"info","ts":"2020-07-15T17:16:43.530+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-15T17:16:43+08:00","grpc.request.deadline":"2020-07-15T17:16:48+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Select","grpc.code":"OK","grpc.time_ms":23.360000610351562}
{"level":"info","ts":"2020-07-15T17:16:49.057+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-15T17:16:49+08:00","grpc.request.deadline":"2020-07-15T17:16:54+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Select","grpc.code":"OK","grpc.time_ms":5.703999996185303}
{"level":"info","ts":"2020-07-16T16:27:25.412+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T16:27:25+08:00","grpc.request.deadline":"2020-07-16T16:27:30+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Select","grpc.code":"OK","grpc.time_ms":51.71200180053711}
{"level":"info","ts":"2020-07-16T16:28:48.171+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T16:28:48+08:00","grpc.request.deadline":"2020-07-16T16:28:53+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Select","grpc.code":"OK","grpc.time_ms":12.618000030517578}
{"level":"info","ts":"2020-07-16T16:32:50.885+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T16:32:50+08:00","grpc.request.deadline":"2020-07-16T16:32:55+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Select","grpc.code":"OK","grpc.time_ms":403.29901123046875}
{"level":"info","ts":"2020-07-16T16:32:53.782+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T16:32:53+08:00","grpc.request.deadline":"2020-07-16T16:32:58+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Select","grpc.code":"OK","grpc.time_ms":18.92099952697754}
{"level":"info","ts":"2020-07-16T17:02:30.391+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:02:30+08:00","grpc.request.deadline":"2020-07-16T17:02:35+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Delete","grpc.code":"OK","grpc.time_ms":16.729999542236328}
{"level":"info","ts":"2020-07-16T17:02:44.506+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:02:44+08:00","grpc.request.deadline":"2020-07-16T17:02:49+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Delete","grpc.code":"OK","grpc.time_ms":24.576000213623047}
{"level":"info","ts":"2020-07-16T17:02:57.971+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:02:57+08:00","grpc.request.deadline":"2020-07-16T17:03:02+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Delete","grpc.code":"OK","grpc.time_ms":7.050000190734863}
{"level":"info","ts":"2020-07-16T17:03:00.225+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:03:00+08:00","grpc.request.deadline":"2020-07-16T17:03:05+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Delete","grpc.code":"OK","grpc.time_ms":6.9070000648498535}
{"level":"error","ts":"2020-07-16T17:32:53.605+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code Internal","grpc.start_time":"2020-07-16T17:32:53+08:00","grpc.request.deadline":"2020-07-16T17:32:58+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Update","error":"rpc error: code = Internal desc = 没有数据更改","grpc.code":"Internal","grpc.time_ms":0.16699999570846558}
{"level":"error","ts":"2020-07-16T17:33:07.958+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code Internal","grpc.start_time":"2020-07-16T17:33:07+08:00","grpc.request.deadline":"2020-07-16T17:33:12+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Update","error":"rpc error: code = Internal desc = 没有数据更改","grpc.code":"Internal","grpc.time_ms":0.33899998664855957}
{"level":"info","ts":"2020-07-16T17:33:49.309+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:33:49+08:00","grpc.request.deadline":"2020-07-16T17:33:54+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Update","grpc.code":"OK","grpc.time_ms":17.246999740600586}
{"level":"info","ts":"2020-07-16T17:33:56.959+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:33:56+08:00","grpc.request.deadline":"2020-07-16T17:34:01+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Update","grpc.code":"OK","grpc.time_ms":13.79800033569336}
{"level":"info","ts":"2020-07-16T17:34:16.328+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:34:16+08:00","grpc.request.deadline":"2020-07-16T17:34:21+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Update","grpc.code":"OK","grpc.time_ms":243.86900329589844}
{"level":"info","ts":"2020-07-16T17:34:47.549+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:34:47+08:00","grpc.request.deadline":"2020-07-16T17:34:52+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Update","grpc.code":"OK","grpc.time_ms":17.93000030517578}
{"level":"info","ts":"2020-07-16T17:34:51.940+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:34:51+08:00","grpc.request.deadline":"2020-07-16T17:34:56+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Update","grpc.code":"OK","grpc.time_ms":12.161999702453613}
{"level":"info","ts":"2020-07-16T17:35:47.122+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:35:47+08:00","grpc.request.deadline":"2020-07-16T17:35:52+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Update","grpc.code":"OK","grpc.time_ms":6.765999794006348}
{"level":"info","ts":"2020-07-16T17:36:20.310+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:36:20+08:00","grpc.request.deadline":"2020-07-16T17:36:25+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Update","grpc.code":"OK","grpc.time_ms":21.08799934387207}
{"level":"info","ts":"2020-07-16T17:37:06.735+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:37:06+08:00","grpc.request.deadline":"2020-07-16T17:37:11+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Update","grpc.code":"OK","grpc.time_ms":35.04800033569336}
{"level":"info","ts":"2020-07-16T17:37:26.023+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:37:26+08:00","grpc.request.deadline":"2020-07-16T17:37:31+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Update","grpc.code":"OK","grpc.time_ms":7.135000228881836}
{"level":"info","ts":"2020-07-16T17:37:40.912+0800","caller":"go-grpc-middleware@v1.2.0/chain.go:25","msg":"finished unary call with code OK","grpc.start_time":"2020-07-16T17:37:40+08:00","grpc.request.deadline":"2020-07-16T17:37:45+08:00","system":"grpc","span.kind":"server","grpc.service":"pb.ConfigureSevice","grpc.method":"Update","grpc.code":"OK","grpc.time_ms":47.12099838256836}
No preview for this file type
...@@ -35,9 +35,10 @@ type Public struct { ...@@ -35,9 +35,10 @@ type Public struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
CompanyUserId int64 `protobuf:"varint,1,opt,name=CompanyUserId,proto3" json:"CompanyUserId,omitempty"` Id int64 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
MultideviceType int64 `protobuf:"varint,2,opt,name=MultideviceType,proto3" json:"MultideviceType,omitempty"` CompanyUserId int64 `protobuf:"varint,2,opt,name=CompanyUserId,proto3" json:"CompanyUserId,omitempty"`
MsgHookUrl string `protobuf:"bytes,3,opt,name=MsgHookUrl,proto3" json:"MsgHookUrl,omitempty"` MultideviceType int64 `protobuf:"varint,3,opt,name=MultideviceType,proto3" json:"MultideviceType,omitempty"`
MsgHookUrl string `protobuf:"bytes,4,opt,name=MsgHookUrl,proto3" json:"MsgHookUrl,omitempty"`
} }
func (x *Public) Reset() { func (x *Public) Reset() {
...@@ -72,6 +73,13 @@ func (*Public) Descriptor() ([]byte, []int) { ...@@ -72,6 +73,13 @@ func (*Public) Descriptor() ([]byte, []int) {
return file_u_proto_im_base_proto_rawDescGZIP(), []int{0} return file_u_proto_im_base_proto_rawDescGZIP(), []int{0}
} }
func (x *Public) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Public) GetCompanyUserId() int64 { func (x *Public) GetCompanyUserId() int64 {
if x != nil { if x != nil {
return x.CompanyUserId return x.CompanyUserId
...@@ -98,10 +106,8 @@ type ConfigureRequest struct { ...@@ -98,10 +106,8 @@ type ConfigureRequest struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Appkey string `protobuf:"bytes,1,opt,name=Appkey,proto3" json:"Appkey,omitempty"` Public *Public `protobuf:"bytes,1,opt,name=Public,proto3" json:"Public,omitempty"`
Current string `protobuf:"bytes,2,opt,name=Current,proto3" json:"Current,omitempty"` AppId int64 `protobuf:"varint,2,opt,name=AppId,proto3" json:"AppId,omitempty"`
Public *Public `protobuf:"bytes,3,opt,name=Public,proto3" json:"Public,omitempty"`
AppId int64 `protobuf:"varint,4,opt,name=AppId,proto3" json:"AppId,omitempty"`
} }
func (x *ConfigureRequest) Reset() { func (x *ConfigureRequest) Reset() {
...@@ -136,20 +142,6 @@ func (*ConfigureRequest) Descriptor() ([]byte, []int) { ...@@ -136,20 +142,6 @@ func (*ConfigureRequest) Descriptor() ([]byte, []int) {
return file_u_proto_im_base_proto_rawDescGZIP(), []int{1} return file_u_proto_im_base_proto_rawDescGZIP(), []int{1}
} }
func (x *ConfigureRequest) GetAppkey() string {
if x != nil {
return x.Appkey
}
return ""
}
func (x *ConfigureRequest) GetCurrent() string {
if x != nil {
return x.Current
}
return ""
}
func (x *ConfigureRequest) GetPublic() *Public { func (x *ConfigureRequest) GetPublic() *Public {
if x != nil { if x != nil {
return x.Public return x.Public
...@@ -207,7 +199,7 @@ type ConfigureDelRequest struct { ...@@ -207,7 +199,7 @@ type ConfigureDelRequest struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
CompanyUserId int64 `protobuf:"varint,1,opt,name=CompanyUserId,proto3" json:"CompanyUserId,omitempty"` Id int64 `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
} }
func (x *ConfigureDelRequest) Reset() { func (x *ConfigureDelRequest) Reset() {
...@@ -242,9 +234,9 @@ func (*ConfigureDelRequest) Descriptor() ([]byte, []int) { ...@@ -242,9 +234,9 @@ func (*ConfigureDelRequest) Descriptor() ([]byte, []int) {
return file_u_proto_im_base_proto_rawDescGZIP(), []int{3} return file_u_proto_im_base_proto_rawDescGZIP(), []int{3}
} }
func (x *ConfigureDelRequest) GetCompanyUserId() int64 { func (x *ConfigureDelRequest) GetId() int64 {
if x != nil { if x != nil {
return x.CompanyUserId return x.Id
} }
return 0 return 0
} }
...@@ -436,54 +428,51 @@ var file_u_proto_im_base_proto_rawDesc = []byte{ ...@@ -436,54 +428,51 @@ var file_u_proto_im_base_proto_rawDesc = []byte{
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x77, 0x69, 0x74, 0x6b, 0x6f, 0x77, 0x2f, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x77, 0x69, 0x74, 0x6b, 0x6f, 0x77, 0x2f,
0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x67, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2d, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
0x6f, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x72, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x78, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x24, 0x0a, 0x6f, 0x74, 0x6f, 0x22, 0x88, 0x01, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x0e,
0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x64, 0x12, 0x24,
0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x55, 0x73, 0x65, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18,
0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x64, 0x65, 0x76, 0x69, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x55, 0x73,
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x4d, 0x75, 0x65, 0x72, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x64, 0x65, 0x76,
0x6c, 0x74, 0x69, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x4d,
0x0a, 0x4d, 0x73, 0x67, 0x48, 0x6f, 0x6f, 0x6b, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x75, 0x6c, 0x74, 0x69, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e,
0x09, 0x52, 0x0a, 0x4d, 0x73, 0x67, 0x48, 0x6f, 0x6f, 0x6b, 0x55, 0x72, 0x6c, 0x22, 0x86, 0x01, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x48, 0x6f, 0x6f, 0x6b, 0x55, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0a, 0x4d, 0x73, 0x67, 0x48, 0x6f, 0x6f, 0x6b, 0x55, 0x72, 0x6c, 0x22, 0x54,
0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x70, 0x70, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x41, 0x70, 0x70, 0x6b, 0x65, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x75, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x52, 0x06,
0x72, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x75, 0x72, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x1c, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x18,
0x72, 0x65, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x03, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x10, 0x00, 0x52, 0x05, 0x41,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x70, 0x70, 0x49, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72,
0x52, 0x06, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x1c, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x49, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x2d, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x10, 0x00, 0x52, 0x75, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a,
0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x10,
0x75, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x43, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x66, 0x00, 0x52, 0x02, 0x49, 0x64, 0x22, 0x0f, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52,
0x69, 0x67, 0x75, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x32, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c,
0x2c, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x05, 0x52, 0x65, 0x70, 0x6c,
0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06, 0xe2, 0xdf, 0x1f, 0x02, 0x10, 0x00, 0x52, 0x0d, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x62,
0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x0f, 0x0a, 0x6c, 0x69, 0x63, 0x52, 0x05, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x39, 0x0a, 0x0b, 0x47, 0x65,
0x0d, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x32, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2a, 0x0a, 0x06, 0x47, 0x65, 0x74,
0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x41, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x47,
0x12, 0x20, 0x0a, 0x05, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4f, 0x6e, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x06, 0x47,
0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x52, 0x05, 0x52, 0x65, 0x70, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x22, 0x33, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52,
0x6c, 0x79, 0x22, 0x39, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63,
0x79, 0x12, 0x2a, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x62, 0x6c,
0x0b, 0x32, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x4f, 0x6e, 0x65, 0x69, 0x63, 0x52, 0x06, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x32, 0xe0, 0x01, 0x0a, 0x0f, 0x43,
0x52, 0x65, 0x70, 0x6c, 0x79, 0x52, 0x06, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x22, 0x33, 0x0a, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x53, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2e,
0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65,
0x0a, 0x06, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x70, 0x62,
0x2e, 0x70, 0x62, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x52, 0x06, 0x50, 0x75, 0x62, 0x6c, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x31,
0x69, 0x63, 0x32, 0xe0, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x53, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x2e, 0x0a, 0x06, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x62,
0x12, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x00, 0x12, 0x37, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x62,
0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x14, 0x2e, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71,
0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x71, 0x75, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x75, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x06, 0x55, 0x70,
0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x64, 0x61, 0x74, 0x65, 0x12, 0x11, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x65, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e,
0x72, 0x65, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x70, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x62, 0x06, 0x70,
0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x22, 0x00, 0x12, 0x31, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x11, 0x2e, 0x70,
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x12, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x22, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
......
...@@ -34,8 +34,8 @@ func (this *ConfigureReply) Validate() error { ...@@ -34,8 +34,8 @@ func (this *ConfigureReply) Validate() error {
return nil return nil
} }
func (this *ConfigureDelRequest) Validate() error { func (this *ConfigureDelRequest) Validate() error {
if !(this.CompanyUserId > 0) { if !(this.Id > 0) {
return github_com_mwitkow_go_proto_validators.FieldError("CompanyUserId", fmt.Errorf(`value '%v' must be greater than '0'`, this.CompanyUserId)) return github_com_mwitkow_go_proto_validators.FieldError("Id", fmt.Errorf(`value '%v' must be greater than '0'`, this.Id))
} }
return nil return nil
} }
......
...@@ -43,7 +43,7 @@ func AddImBase(im *validator_struct.ConfigureAddStruct) error { ...@@ -43,7 +43,7 @@ func AddImBase(im *validator_struct.ConfigureAddStruct) error {
func DelConfigure(user_id int64) (err error) { func DelConfigure(user_id int64) (err error) {
configure := new(db.ImBase) configure := new(db.ImBase)
configure.CompanyUserId = user_id configure.Id = int(user_id)
_, err = db.MysqlClient.Delete(configure) _, err = db.MysqlClient.Delete(configure)
if err != nil { if err != nil {
err = status.Error(codes.Internal, err.Error()) err = status.Error(codes.Internal, err.Error())
...@@ -76,6 +76,6 @@ func UpdateConfiguer(im *validator_struct.ConfigureUpdateStruct) error { ...@@ -76,6 +76,6 @@ func UpdateConfiguer(im *validator_struct.ConfigureUpdateStruct) error {
return errors.New("没有数据更改") return errors.New("没有数据更改")
} }
_, err := db.MysqlClient.QueryTable(b_table_name). _, err := db.MysqlClient.QueryTable(b_table_name).
Filter(b_user_id, im.CompanyUserId).Update(orm_params) Filter("id", im.Id).Update(orm_params)
return err return err
} }
...@@ -51,7 +51,7 @@ func (cs *ConfigureSevice) Delete(ctx context.Context, ...@@ -51,7 +51,7 @@ func (cs *ConfigureSevice) Delete(ctx context.Context,
return return
} }
// 执行删除操作 // 执行删除操作
if err = DelConfigure(in.CompanyUserId); err != nil { if err = DelConfigure(in.Id); err != nil {
return return
} }
reply = &pb.ConfigureReply{} reply = &pb.ConfigureReply{}
...@@ -77,6 +77,7 @@ func (cs *ConfigureSevice) Select(ctx context.Context, ...@@ -77,6 +77,7 @@ func (cs *ConfigureSevice) Select(ctx context.Context,
for _, v := range configs { for _, v := range configs {
reply.GetAll = append(reply.GetAll, &pb.GetAllOneReply{ reply.GetAll = append(reply.GetAll, &pb.GetAllOneReply{
Reply: &pb.Public{ Reply: &pb.Public{
Id:int64(v.Id),
CompanyUserId: v.CompanyUserId, CompanyUserId: v.CompanyUserId,
MultideviceType: v.MultideviceType, MultideviceType: v.MultideviceType,
MsgHookUrl: v.MsgHookUrl, MsgHookUrl: v.MsgHookUrl,
......
...@@ -6,22 +6,21 @@ package pb; ...@@ -6,22 +6,21 @@ package pb;
import "github.com/mwitkow/go-proto-validators/validator.proto"; import "github.com/mwitkow/go-proto-validators/validator.proto";
message Public { message Public {
int64 CompanyUserId = 1; int64 Id = 1;
int64 MultideviceType = 2; int64 CompanyUserId = 2;
string MsgHookUrl = 3; int64 MultideviceType = 3;
string MsgHookUrl = 4;
} }
message ConfigureRequest { message ConfigureRequest {
string Appkey= 1; Public Public = 1;
string Current=2; int64 AppId = 2 [(validator.field) = {int_gt: 0}];
Public Public = 3;
int64 AppId = 4 [(validator.field) = {int_gt: 0}];
} }
message ConfigureReply {} message ConfigureReply {}
message ConfigureDelRequest { message ConfigureDelRequest {
int64 CompanyUserId = 1 [(validator.field) = {int_gt: 0}]; int64 Id = 1 [(validator.field) = {int_gt: 0}];
} }
message GetAllRequest { message GetAllRequest {
......
...@@ -39,7 +39,7 @@ func NewConfigureAddStruct(inter interface{}) *ConfigureAddStruct { ...@@ -39,7 +39,7 @@ func NewConfigureAddStruct(inter interface{}) *ConfigureAddStruct {
// 修改配置 // 修改配置
type ConfigureUpdateStruct struct { type ConfigureUpdateStruct struct {
CompanyUserId int64 `validate:"required,numeric"` Id int64 `validate:"required,numeric"`
MultideviceType int64 MultideviceType int64
MsgHookUrl string MsgHookUrl string
} }
...@@ -48,28 +48,29 @@ func NewConfigureUpdateStruct(in interface{}) *ConfigureUpdateStruct { ...@@ -48,28 +48,29 @@ func NewConfigureUpdateStruct(in interface{}) *ConfigureUpdateStruct {
var config_update = &ConfigureUpdateStruct{} var config_update = &ConfigureUpdateStruct{}
switch in.(type) { switch in.(type) {
case *pb.UpdateRequest: case *pb.UpdateRequest:
var v = in.(*pb.ConfigureRequest) var v = in.(*pb.UpdateRequest)
config_update.CompanyUserId = v.Public.GetCompanyUserId()
config_update.MultideviceType = v.Public.GetMultideviceType() config_update.MultideviceType = v.Public.GetMultideviceType()
config_update.MsgHookUrl = v.Public.GetMsgHookUrl() config_update.MsgHookUrl = v.Public.GetMsgHookUrl()
config_update.Id = v.Public.Id
case map[string]interface{}: case map[string]interface{}:
var c = in.(map[string]interface{}) var c = in.(map[string]interface{})
if cui, ok := c["company_user_id"].(int64); ok {
config_update.CompanyUserId = cui
}
if mt, ok := c["multidevice_type"].(int64); ok { if mt, ok := c["multidevice_type"].(int64); ok {
config_update.MultideviceType = mt config_update.MultideviceType = mt
} }
if mhu, ok := c["msg_hook_url"].(string); ok { if mhu, ok := c["msg_hook_url"].(string); ok {
config_update.MsgHookUrl = mhu config_update.MsgHookUrl = mhu
} }
if id, ok := c["id"].(int64); ok {
config_update.Id = id
}
} }
return config_update return config_update
} }
// 删除配置 // 删除配置
type ConfigureDelStruct struct { type ConfigureDelStruct struct {
CompanyUserId int64 `validate:"required,numeric"` Id int64 `validate:"required,numeric"`
} }
func NewConfigureDelStruct(inter interface{}) *ConfigureDelStruct { func NewConfigureDelStruct(inter interface{}) *ConfigureDelStruct {
...@@ -77,11 +78,11 @@ func NewConfigureDelStruct(inter interface{}) *ConfigureDelStruct { ...@@ -77,11 +78,11 @@ func NewConfigureDelStruct(inter interface{}) *ConfigureDelStruct {
switch inter.(type) { switch inter.(type) {
case *pb.ConfigureDelRequest: case *pb.ConfigureDelRequest:
var c = inter.(*pb.ConfigureDelRequest) var c = inter.(*pb.ConfigureDelRequest)
room.CompanyUserId = c.GetCompanyUserId() room.Id = c.GetId()
case map[string]interface{}: case map[string]interface{}:
var c = inter.(map[string]interface{}) var c = inter.(map[string]interface{})
if v, ok := c["company_user_id"].(int64); ok { if v, ok := c["company_user_id"].(int64); ok {
room.CompanyUserId = v room.Id = v
} }
} }
return room return room
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment