mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-12-25 09:35:57 +08:00
feat: add img_calls field for recharge products
This commit is contained in:
@@ -196,6 +196,7 @@ func (h *PaymentHandler) PayQrcode(c *gin.Context) {
|
||||
remark := types.OrderRemark{
|
||||
Days: product.Days,
|
||||
Calls: product.Calls,
|
||||
ImgCalls: product.ImgCalls,
|
||||
Name: product.Name,
|
||||
Price: product.Price,
|
||||
Discount: product.Discount,
|
||||
@@ -330,6 +331,12 @@ func (h *PaymentHandler) notify(orderNo string) error {
|
||||
user.Calls += h.App.SysConfig.VipMonthCalls
|
||||
}
|
||||
|
||||
if remark.ImgCalls > 0 {
|
||||
user.ImgCalls += remark.ImgCalls
|
||||
} else {
|
||||
user.ImgCalls += h.App.SysConfig.VipMonthImgCalls
|
||||
}
|
||||
|
||||
// 更新用户信息
|
||||
res = h.db.Updates(&user)
|
||||
if res.Error != nil {
|
||||
|
||||
Reference in New Issue
Block a user