info get profile

This commit is contained in:
eson 2023-09-27 15:48:13 +08:00
parent 0a8f3cd5ba
commit 31b712784f
2 changed files with 3 additions and 8 deletions

View File

@ -46,7 +46,6 @@ func (l *UserAddAddressLogic) UserAddAddress(req *types.RequestAddAddress, useri
if req.Id == 0 {
var (
country string = "USA" // 国家默认为美国
isDefautl int64 = 1 // 默认地址为1
)
createOne := &gmodel.FsAddress{ // 构建FsAddress结构体
FirstName: &req.FirstName,
@ -60,7 +59,6 @@ func (l *UserAddAddressLogic) UserAddAddress(req *types.RequestAddAddress, useri
Status: &status,
UserId: &userinfo.UserId,
ZipCode: &req.ZipCode,
IsDefault: &isDefautl,
}
created, err := m.CreateOne(l.ctx, createOne) // 新增地址
if err != nil {
@ -82,7 +80,6 @@ func (l *UserAddAddressLogic) UserAddAddress(req *types.RequestAddAddress, useri
Status: &status,
UserId: &userinfo.UserId,
ZipCode: &req.ZipCode,
IsDefault: &req.IsDefault,
}
// 插入数据库 更新地址

View File

@ -50,7 +50,6 @@ func (l *AddressAddLogic) AddressAdd(req *types.AddressRequest, userinfo *auth.U
var (
country string = "USA" // 国家默认为美国
isDefautl int64 = 1 // 默认地址为1
status int64 = 1 // 默认地址状态为1(正常)
)
@ -66,7 +65,6 @@ func (l *AddressAddLogic) AddressAdd(req *types.AddressRequest, userinfo *auth.U
Status: &status,
UserId: &userinfo.UserId,
ZipCode: &req.ZipCode,
IsDefault: &isDefautl,
}
address, err := m.CreateOne(l.ctx, createOne) // 新增地址
if err != nil {