mirror of
https://gitee.com/blackfox/geekai.git
synced 2024-12-02 04:07:41 +08:00
feat: change mobile field to username
This commit is contained in:
parent
913d538587
commit
4c1f51110b
@ -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
|
||||
|
@ -10,7 +10,7 @@ type Order struct {
|
||||
BaseModel
|
||||
UserId uint
|
||||
ProductId uint
|
||||
Mobile string
|
||||
Username string
|
||||
OrderNo string
|
||||
Subject string
|
||||
Amount float64
|
||||
|
@ -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"`
|
||||
|
2
database/update-v3.2.5.sql
Normal file
2
database/update-v3.2.5.sql
Normal file
@ -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 '用户名';
|
@ -12,7 +12,7 @@
|
||||
<el-table-column label="邀请奖励">
|
||||
<template #default="scope">
|
||||
<span>对话:{{ scope.row['reward']['chat_calls'] }}次</span>,
|
||||
<span>绘图:{{ scope.row['reward']['chat_calls'] }}次</span>
|
||||
<span>绘图:{{ scope.row['reward']['img_calls'] }}次</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-row>
|
||||
<el-table :data="items" :row-key="row => row.id" table-layout="auto">
|
||||
<el-table-column prop="order_no" label="订单号"/>
|
||||
<el-table-column prop="mobile" label="下单用户"/>
|
||||
<el-table-column prop="username" label="下单用户"/>
|
||||
<el-table-column prop="subject" label="产品名称"/>
|
||||
<el-table-column prop="amount" label="订单金额"/>
|
||||
<el-table-column label="调用次数">
|
||||
|
Loading…
Reference in New Issue
Block a user