info address
This commit is contained in:
parent
55a4526536
commit
47a1ecfc79
|
@ -107,10 +107,8 @@ func (a *FsAddressModel) SettingUserDefaultAddress(ctx context.Context, userId i
|
|||
}
|
||||
|
||||
func (a *FsAddressModel) DeleteOne(ctx context.Context, addressId int64, userId int64) (err error) {
|
||||
address := &FsAddress{
|
||||
AddressId: addressId,
|
||||
UserId: &userId,
|
||||
}
|
||||
err = a.db.WithContext(ctx).Model(&FsAddress{}).Where("`address_id` = ? and `user_id` = ? and `status` = ? ", addressId, userId, 1).Delete(address).Error
|
||||
err = a.db.WithContext(ctx).Model(&FsAddress{}).
|
||||
Where("`address_id` = ? and `user_id` = ? and `status` = ? ", addressId, userId, 1).
|
||||
UpdateColumn("status", 0).Error
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user