Commit 3aca4cf7 by Li Feifei

debug

parent 01abd86e
......@@ -393,7 +393,7 @@ var file_u_proto_im_friend_req_proto_rawDesc = []byte{
0x0a, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a,
0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x06, 0x43, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x42, 0x06,
0xe2, 0xdf, 0x1f, 0x02, 0x58, 0x01, 0x52, 0x02, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x06, 0x53, 0x74,
0xe2, 0xdf, 0x1f, 0x02, 0x10, 0x00, 0x52, 0x02, 0x49, 0x64, 0x12, 0x20, 0x0a, 0x06, 0x53, 0x74,
0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x42, 0x08, 0xe2, 0xdf, 0x1f, 0x04,
0x10, 0x00, 0x18, 0x03, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x53, 0x0a, 0x0f,
0x49, 0x6d, 0x46, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12,
......
......@@ -39,6 +39,9 @@ func (this *ImFriendUpdateReq) Validate() error {
return github_com_mwitkow_go_proto_validators.FieldError("Common", err)
}
}
if !(this.Id > 0) {
return github_com_mwitkow_go_proto_validators.FieldError("Id", fmt.Errorf(`value '%v' must be greater than '0'`, this.Id))
}
if !(this.Status > 0) {
return github_com_mwitkow_go_proto_validators.FieldError("Status", fmt.Errorf(`value '%v' must be greater than '0'`, this.Status))
}
......
......@@ -18,7 +18,7 @@ message ImFriendEmptyReply {}
// 更改添加好友状态
message ImFriendUpdateReq {
Common Common = 1;
int64 Id = 2 [(validator.field) = {string_not_empty: true}];
int64 Id = 2 [(validator.field) = {int_gt: 0}];
int64 Status = 3 [(validator.field) = {int_gt: 0, int_lt:3}];
}
......
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