diff --git a/api/handler/payment_handler.go b/api/handler/payment_handler.go
index 63dfdcd..da68ec2 100644
--- a/api/handler/payment_handler.go
+++ b/api/handler/payment_handler.go
@@ -199,13 +199,17 @@ func (h *PaymentHandler) PayQrcode(c *gin.Context) {
}
var payWay string
+ var notifyURL string
switch data.PayWay {
case "hupi":
payWay = PayWayXunHu
+ notifyURL = h.App.Config.HuPiPayConfig.NotifyURL
case "payjs":
payWay = PayWayJs
+ notifyURL = h.App.Config.JPayConfig.NotifyURL
default:
payWay = PayWayAlipay
+ notifyURL = h.App.Config.AlipayConfig.NotifyURL
}
// 创建订单
remark := types.OrderRemark{
@@ -218,7 +222,7 @@ func (h *PaymentHandler) PayQrcode(c *gin.Context) {
}
order := model.Order{
UserId: user.Id,
- Mobile: user.Username,
+ Username: user.Username,
ProductId: product.Id,
OrderNo: orderNo,
Subject: product.Name,
@@ -267,7 +271,7 @@ func (h *PaymentHandler) PayQrcode(c *gin.Context) {
return
}
- parse, err := url.Parse(h.App.Config.AlipayConfig.NotifyURL)
+ parse, err := url.Parse(notifyURL)
if err != nil {
resp.ERROR(c, err.Error())
return
diff --git a/api/store/model/order.go b/api/store/model/order.go
index 16d01b0..73d2607 100644
--- a/api/store/model/order.go
+++ b/api/store/model/order.go
@@ -10,7 +10,7 @@ type Order struct {
BaseModel
UserId uint
ProductId uint
- Mobile string
+ Username string
OrderNo string
Subject string
Amount float64
diff --git a/api/store/vo/order.go b/api/store/vo/order.go
index 99878dc..e046de6 100644
--- a/api/store/vo/order.go
+++ b/api/store/vo/order.go
@@ -8,7 +8,7 @@ type Order struct {
BaseVo
UserId uint `json:"user_id"`
ProductId uint `json:"product_id"`
- Mobile string `json:"mobile"`
+ Username string `json:"username"`
OrderNo string `json:"order_no"`
Subject string `json:"subject"`
Amount float64 `json:"amount"`
diff --git a/database/update-v3.2.5.sql b/database/update-v3.2.5.sql
new file mode 100644
index 0000000..7aff250
--- /dev/null
+++ b/database/update-v3.2.5.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `chatgpt_orders` CHANGE `mobile` `username` VARCHAR(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户明';
+ALTER TABLE `chatgpt_invite_logs` CHANGE `username` `username` VARCHAR(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '用户名';
\ No newline at end of file
diff --git a/web/src/components/InviteList.vue b/web/src/components/InviteList.vue
index 0f97095..501dddd 100644
--- a/web/src/components/InviteList.vue
+++ b/web/src/components/InviteList.vue
@@ -12,7 +12,7 @@
对话:{{ scope.row['reward']['chat_calls'] }}次,
- 绘图:{{ scope.row['reward']['chat_calls'] }}次
+ 绘图:{{ scope.row['reward']['img_calls'] }}次
diff --git a/web/src/views/admin/Order.vue b/web/src/views/admin/Order.vue
index 3e2169e..2b79ccd 100644
--- a/web/src/views/admin/Order.vue
+++ b/web/src/views/admin/Order.vue
@@ -17,7 +17,7 @@
-
+