fix: make file correcrt repo
This commit is contained in:
parent
714163bbe6
commit
7474126d6d
9
Makefile
9
Makefile
|
@ -5,7 +5,7 @@ GOFMT ?= gofmt "-s"
|
|||
GOFILES := $(shell find . -name "*.go")
|
||||
LDFLAGS := -s -w
|
||||
VERSION="v1.0.4"
|
||||
DOCKER_REPO="igs170911/member"
|
||||
DOCKER_REPO="reg.wang/app-cloudep-member-service"
|
||||
GIT_COMMIT ?= $(shell git rev-parse --short HEAD)
|
||||
|
||||
.PHONY: test
|
||||
|
@ -31,12 +31,7 @@ run-docker: # 建立 rpc code
|
|||
.PHONY: build-docker
|
||||
build-docker:
|
||||
cp ./build/Dockerfile Dockerfile
|
||||
docker buildx build \
|
||||
-t $(DOCKER_REPO):$(VERSION) \
|
||||
--build-arg VERSION=$(VERSION) \
|
||||
--build-arg GIT_COMMIT=$(GIT_COMMIT) \
|
||||
--secret id=ssh_key,src=./build/id_ed25519 \
|
||||
--progress=plain .
|
||||
docker buildx build -t $(DOCKER_REPO):$(VERSION) --build-arg SSH_PRIVATE_KEY="$(cat ~/.ssh/id_ed25519)" .
|
||||
rm -rf Dockerfile
|
||||
@echo "Generate core-api files successfully"
|
||||
|
||||
|
|
|
@ -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