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, 表示新增地址
|
// 如果ID为0, 表示新增地址
|
||||||
if req.Id == 0 {
|
if req.Id == 0 {
|
||||||
var (
|
var (
|
||||||
country string = "USA" // 国家默认为美国
|
country string = "USA" // 国家默认为美国
|
||||||
isDefautl int64 = 1 // 默认地址为1
|
|
||||||
)
|
)
|
||||||
createOne := &gmodel.FsAddress{ // 构建FsAddress结构体
|
createOne := &gmodel.FsAddress{ // 构建FsAddress结构体
|
||||||
FirstName: &req.FirstName,
|
FirstName: &req.FirstName,
|
||||||
|
@ -60,7 +59,6 @@ func (l *UserAddAddressLogic) UserAddAddress(req *types.RequestAddAddress, useri
|
||||||
Status: &status,
|
Status: &status,
|
||||||
UserId: &userinfo.UserId,
|
UserId: &userinfo.UserId,
|
||||||
ZipCode: &req.ZipCode,
|
ZipCode: &req.ZipCode,
|
||||||
IsDefault: &isDefautl,
|
|
||||||
}
|
}
|
||||||
created, err := m.CreateOne(l.ctx, createOne) // 新增地址
|
created, err := m.CreateOne(l.ctx, createOne) // 新增地址
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -82,7 +80,6 @@ func (l *UserAddAddressLogic) UserAddAddress(req *types.RequestAddAddress, useri
|
||||||
Status: &status,
|
Status: &status,
|
||||||
UserId: &userinfo.UserId,
|
UserId: &userinfo.UserId,
|
||||||
ZipCode: &req.ZipCode,
|
ZipCode: &req.ZipCode,
|
||||||
IsDefault: &req.IsDefault,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 插入数据库 更新地址
|
// 插入数据库 更新地址
|
||||||
|
|
|
@ -49,9 +49,8 @@ func (l *AddressAddLogic) AddressAdd(req *types.AddressRequest, userinfo *auth.U
|
||||||
// 如果ID为0, 表示新增地址
|
// 如果ID为0, 表示新增地址
|
||||||
|
|
||||||
var (
|
var (
|
||||||
country string = "USA" // 国家默认为美国
|
country string = "USA" // 国家默认为美国
|
||||||
isDefautl int64 = 1 // 默认地址为1
|
status int64 = 1 // 默认地址状态为1(正常)
|
||||||
status int64 = 1 // 默认地址状态为1(正常)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
createOne := &gmodel.FsAddress{ // 构建FsAddress结构体
|
createOne := &gmodel.FsAddress{ // 构建FsAddress结构体
|
||||||
|
@ -66,7 +65,6 @@ func (l *AddressAddLogic) AddressAdd(req *types.AddressRequest, userinfo *auth.U
|
||||||
Status: &status,
|
Status: &status,
|
||||||
UserId: &userinfo.UserId,
|
UserId: &userinfo.UserId,
|
||||||
ZipCode: &req.ZipCode,
|
ZipCode: &req.ZipCode,
|
||||||
IsDefault: &isDefautl,
|
|
||||||
}
|
}
|
||||||
address, err := m.CreateOne(l.ctx, createOne) // 新增地址
|
address, err := m.CreateOne(l.ctx, createOne) // 新增地址
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user