info get profile
This commit is contained in:
parent
0a8f3cd5ba
commit
31b712784f
|
@ -45,8 +45,7 @@ func (l *UserAddAddressLogic) UserAddAddress(req *types.RequestAddAddress, useri
|
|||
// 如果ID为0, 表示新增地址
|
||||
if req.Id == 0 {
|
||||
var (
|
||||
country string = "USA" // 国家默认为美国
|
||||
isDefautl int64 = 1 // 默认地址为1
|
||||
country string = "USA" // 国家默认为美国
|
||||
)
|
||||
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,
|
||||
}
|
||||
|
||||
// 插入数据库 更新地址
|
||||
|
|
|
@ -49,9 +49,8 @@ func (l *AddressAddLogic) AddressAdd(req *types.AddressRequest, userinfo *auth.U
|
|||
// 如果ID为0, 表示新增地址
|
||||
|
||||
var (
|
||||
country string = "USA" // 国家默认为美国
|
||||
isDefautl int64 = 1 // 默认地址为1
|
||||
status int64 = 1 // 默认地址状态为1(正常)
|
||||
country string = "USA" // 国家默认为美国
|
||||
status int64 = 1 // 默认地址状态为1(正常)
|
||||
)
|
||||
|
||||
createOne := &gmodel.FsAddress{ // 构建FsAddress结构体
|
||||
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user