fix bug
This commit is contained in:
@@ -1822,10 +1822,10 @@ func (p *UserInfoReq) String() string {
|
||||
}
|
||||
|
||||
type CreateUserRequest struct {
|
||||
Name string `thrift:"name,1" form:"name" form:"name" json:"name" vd:"(len($) > 0 && len($) < 100)"`
|
||||
Gender Gender `thrift:"gender,2" form:"gender" form:"gender" json:"gender" vd:"($ == 1||$ == 2)"`
|
||||
Name string `thrift:"name,1" form:"name" json:"name" vd:"(len($) > 0 && len($) < 100)"`
|
||||
Gender Gender `thrift:"gender,2" form:"gender" json:"gender" vd:"($ == 1||$ == 2)"`
|
||||
Age int64 `thrift:"age,3" form:"age" json:"age" vd:"$>0"`
|
||||
Mobile string `thrift:"mobile,4" form:"mobile" form:"mobile" json:"mobile" vd:"(len($) > 0 && len($) < 12)"`
|
||||
Mobile string `thrift:"mobile,4" form:"mobile" json:"mobile" vd:"(len($) > 0 && len($) < 12)"`
|
||||
Area int64 `thrift:"area,5" form:"area" json:"area" vd:"$>0"`
|
||||
UserPassword string `thrift:"user_password,6" form:"user_password" json:"user_password" vd:"(len($) > 0 && len($) < 15)"`
|
||||
}
|
||||
@@ -7613,11 +7613,12 @@ func (p *ListFriendRelationshipReq) String() string {
|
||||
}
|
||||
|
||||
type FriendRelationshipListInfo struct {
|
||||
UserID string `thrift:"user_id,1" form:"user_id" json:"user_id" query:"user_id"`
|
||||
ID int64 `thrift:"id,1" form:"id" json:"id" query:"id"`
|
||||
ApplicationMessage string `thrift:"application_message,2" form:"application_message" json:"application_message" query:"application_message"`
|
||||
Status int8 `thrift:"status,3" form:"status" json:"status" query:"status"`
|
||||
UserName string `thrift:"user_name,4" form:"user_name" json:"user_name" query:"user_name"`
|
||||
AvatarImageURL string `thrift:"avatar_image_url,5" form:"avatar_image_url" json:"avatar_image_url" query:"avatar_image_url"`
|
||||
UserID string `thrift:"user_id,6" form:"user_id" json:"user_id" query:"user_id"`
|
||||
}
|
||||
|
||||
func NewFriendRelationshipListInfo() *FriendRelationshipListInfo {
|
||||
@@ -7627,8 +7628,8 @@ func NewFriendRelationshipListInfo() *FriendRelationshipListInfo {
|
||||
func (p *FriendRelationshipListInfo) InitDefault() {
|
||||
}
|
||||
|
||||
func (p *FriendRelationshipListInfo) GetUserID() (v string) {
|
||||
return p.UserID
|
||||
func (p *FriendRelationshipListInfo) GetID() (v int64) {
|
||||
return p.ID
|
||||
}
|
||||
|
||||
func (p *FriendRelationshipListInfo) GetApplicationMessage() (v string) {
|
||||
@@ -7647,12 +7648,17 @@ func (p *FriendRelationshipListInfo) GetAvatarImageURL() (v string) {
|
||||
return p.AvatarImageURL
|
||||
}
|
||||
|
||||
func (p *FriendRelationshipListInfo) GetUserID() (v string) {
|
||||
return p.UserID
|
||||
}
|
||||
|
||||
var fieldIDToName_FriendRelationshipListInfo = map[int16]string{
|
||||
1: "user_id",
|
||||
1: "id",
|
||||
2: "application_message",
|
||||
3: "status",
|
||||
4: "user_name",
|
||||
5: "avatar_image_url",
|
||||
6: "user_id",
|
||||
}
|
||||
|
||||
func (p *FriendRelationshipListInfo) Read(iprot thrift.TProtocol) (err error) {
|
||||
@@ -7674,7 +7680,7 @@ func (p *FriendRelationshipListInfo) Read(iprot thrift.TProtocol) (err error) {
|
||||
|
||||
switch fieldId {
|
||||
case 1:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if fieldTypeId == thrift.I64 {
|
||||
if err = p.ReadField1(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
@@ -7713,6 +7719,14 @@ func (p *FriendRelationshipListInfo) Read(iprot thrift.TProtocol) (err error) {
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
case 6:
|
||||
if fieldTypeId == thrift.STRING {
|
||||
if err = p.ReadField6(iprot); err != nil {
|
||||
goto ReadFieldError
|
||||
}
|
||||
} else if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
}
|
||||
default:
|
||||
if err = iprot.Skip(fieldTypeId); err != nil {
|
||||
goto SkipFieldError
|
||||
@@ -7744,13 +7758,13 @@ ReadStructEndError:
|
||||
|
||||
func (p *FriendRelationshipListInfo) ReadField1(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
var _field int64
|
||||
if v, err := iprot.ReadI64(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.UserID = _field
|
||||
p.ID = _field
|
||||
return nil
|
||||
}
|
||||
func (p *FriendRelationshipListInfo) ReadField2(iprot thrift.TProtocol) error {
|
||||
@@ -7797,6 +7811,17 @@ func (p *FriendRelationshipListInfo) ReadField5(iprot thrift.TProtocol) error {
|
||||
p.AvatarImageURL = _field
|
||||
return nil
|
||||
}
|
||||
func (p *FriendRelationshipListInfo) ReadField6(iprot thrift.TProtocol) error {
|
||||
|
||||
var _field string
|
||||
if v, err := iprot.ReadString(); err != nil {
|
||||
return err
|
||||
} else {
|
||||
_field = v
|
||||
}
|
||||
p.UserID = _field
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *FriendRelationshipListInfo) Write(oprot thrift.TProtocol) (err error) {
|
||||
var fieldId int16
|
||||
@@ -7824,6 +7849,10 @@ func (p *FriendRelationshipListInfo) Write(oprot thrift.TProtocol) (err error) {
|
||||
fieldId = 5
|
||||
goto WriteFieldError
|
||||
}
|
||||
if err = p.writeField6(oprot); err != nil {
|
||||
fieldId = 6
|
||||
goto WriteFieldError
|
||||
}
|
||||
}
|
||||
if err = oprot.WriteFieldStop(); err != nil {
|
||||
goto WriteFieldStopError
|
||||
@@ -7843,10 +7872,10 @@ WriteStructEndError:
|
||||
}
|
||||
|
||||
func (p *FriendRelationshipListInfo) writeField1(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("user_id", thrift.STRING, 1); err != nil {
|
||||
if err = oprot.WriteFieldBegin("id", thrift.I64, 1); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(p.UserID); err != nil {
|
||||
if err := oprot.WriteI64(p.ID); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
@@ -7922,6 +7951,22 @@ WriteFieldBeginError:
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 5 end error: ", p), err)
|
||||
}
|
||||
func (p *FriendRelationshipListInfo) writeField6(oprot thrift.TProtocol) (err error) {
|
||||
if err = oprot.WriteFieldBegin("user_id", thrift.STRING, 6); err != nil {
|
||||
goto WriteFieldBeginError
|
||||
}
|
||||
if err := oprot.WriteString(p.UserID); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = oprot.WriteFieldEnd(); err != nil {
|
||||
goto WriteFieldEndError
|
||||
}
|
||||
return nil
|
||||
WriteFieldBeginError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 6 begin error: ", p), err)
|
||||
WriteFieldEndError:
|
||||
return thrift.PrependError(fmt.Sprintf("%T write field 6 end error: ", p), err)
|
||||
}
|
||||
|
||||
func (p *FriendRelationshipListInfo) String() string {
|
||||
if p == nil {
|
||||
|
Reference in New Issue
Block a user