Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop

This commit is contained in:
momo 2023-09-25 16:01:03 +08:00
commit 5be1edfa71

View File

@ -25,7 +25,7 @@ func (a *FsAddressModel) CreateOne(ctx context.Context, address *FsAddress) (res
// now := time.Now().UTC().Unix()
result = &FsAddress{
UserId: address.UserId,
Name: address.Name,
AddressName: address.AddressName,
FirstName: address.FirstName,
LastName: address.LastName,
Mobile: address.Mobile,
@ -57,7 +57,7 @@ func (a *FsAddressModel) UpdateAddAddress(ctx context.Context, address *FsAddres
return err
}
}
return tx.Model(&FsAddress{}).Where("id = ? and user_id = ?", address.Id, address.UserId).Omit("id", "user_id").Updates(address).Error
return tx.Model(&FsAddress{}).Where("id = ? and user_id = ?", address.AddressId, address.UserId).Omit("id", "user_id").Updates(address).Error
})
return err
}