Compare commits
2 Commits
4e0a0330ed
...
99d0f5e453
Author | SHA1 | Date |
---|---|---|
|
99d0f5e453 | |
|
7474126d6d |
2
Makefile
2
Makefile
|
@ -5,7 +5,7 @@ GOFMT ?= gofmt "-s"
|
|||
GOFILES := $(shell find . -name "*.go")
|
||||
LDFLAGS := -s -w
|
||||
VERSION="v1.0.4"
|
||||
DOCKER_REPO="container.wang/app-cloudep-member-service"
|
||||
DOCKER_REPO="reg.wang/app-cloudep-member-service"
|
||||
GIT_COMMIT ?= $(shell git rev-parse --short HEAD)
|
||||
|
||||
.PHONY: test
|
||||
|
|
|
@ -44,21 +44,38 @@ func (l *BindUserInfoLogic) BindUserInfo(in *member.CreateUserInfoReq) (*member.
|
|||
return nil, errs.InvalidFormat(err.Error())
|
||||
}
|
||||
|
||||
err := l.svcCtx.AccountUseCase.BindUserInfo(l.ctx, usecase.CreateUserInfoRequest{
|
||||
insert := usecase.CreateUserInfoRequest{
|
||||
UID: in.GetUid(),
|
||||
AvatarURL: proto.String(in.GetAvatar()),
|
||||
FullName: proto.String(in.GetFullName()),
|
||||
Nickname: proto.String(in.GetNickName()),
|
||||
GenderCode: proto.Int64(in.GetGender()),
|
||||
Birthdate: proto.Int64(in.GetBirthdate()),
|
||||
PhoneNumber: proto.String(in.GetPhoneNumber()),
|
||||
Email: proto.String(in.GetEmail()),
|
||||
Address: proto.String(in.GetAddress()),
|
||||
PreferredLanguage: in.GetLanguage(),
|
||||
Currency: in.GetCurrency(),
|
||||
AlarmCategory: domain.AlarmType(in.GetAlarmType().Number()),
|
||||
UserStatus: domain.Status(in.GetStatus().Number()),
|
||||
})
|
||||
}
|
||||
if in.Avatar != nil {
|
||||
insert.AvatarURL = proto.String(in.GetAvatar())
|
||||
}
|
||||
if in.Birthdate != nil {
|
||||
insert.Birthdate = proto.Int64(in.GetBirthdate())
|
||||
}
|
||||
if in.Gender != nil {
|
||||
insert.GenderCode = proto.Int64(in.GetGender())
|
||||
}
|
||||
if in.FullName != nil {
|
||||
insert.FullName = proto.String(in.GetFullName())
|
||||
}
|
||||
if in.NickName != nil {
|
||||
insert.Nickname = proto.String(in.GetNickName())
|
||||
}
|
||||
if in.PhoneNumber != nil {
|
||||
insert.PhoneNumber = proto.String(in.GetPhoneNumber())
|
||||
}
|
||||
if in.Email != nil {
|
||||
insert.Email = proto.String(in.GetEmail())
|
||||
}
|
||||
if in.Address != nil {
|
||||
insert.Address = proto.String(in.GetAddress())
|
||||
}
|
||||
err := l.svcCtx.AccountUseCase.BindUserInfo(l.ctx, insert)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue