|
|
@@ -152,8 +152,9 @@ func OrderPaySuccess(orderId int64, userId int64) error {
|
|
|
}
|
|
|
userWallet, ok := list.List[0].(domain.UserWallet)
|
|
|
if ok {
|
|
|
- userWallet.Balance = userWallet.Balance + (price * 0.1)
|
|
|
- configs.Engine.Table("user_wallet").ID(userWallet.Id).Cols("balance").Update(map[string]any{"balance": userWallet.Balance})
|
|
|
+ //userWallet.Balance = userWallet.Balance + (price * 0.1)
|
|
|
+ userWallet.PromotionAmount = userWallet.PromotionAmount + (price * 0.1)
|
|
|
+ configs.Engine.Table("user_wallet").ID(userWallet.Id).Cols("balance").Update(map[string]any{"promotion_amount": userWallet.PromotionAmount})
|
|
|
}
|
|
|
return nil
|
|
|
}
|