mirror of
https://gitee.com/blackfox/geekai.git
synced 2024-12-04 05:09:12 +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 payWay string
|
||||||
|
var notifyURL string
|
||||||
switch data.PayWay {
|
switch data.PayWay {
|
||||||
case "hupi":
|
case "hupi":
|
||||||
payWay = PayWayXunHu
|
payWay = PayWayXunHu
|
||||||
|
notifyURL = h.App.Config.HuPiPayConfig.NotifyURL
|
||||||
case "payjs":
|
case "payjs":
|
||||||
payWay = PayWayJs
|
payWay = PayWayJs
|
||||||
|
notifyURL = h.App.Config.JPayConfig.NotifyURL
|
||||||
default:
|
default:
|
||||||
payWay = PayWayAlipay
|
payWay = PayWayAlipay
|
||||||
|
notifyURL = h.App.Config.AlipayConfig.NotifyURL
|
||||||
}
|
}
|
||||||
// 创建订单
|
// 创建订单
|
||||||
remark := types.OrderRemark{
|
remark := types.OrderRemark{
|
||||||
@ -218,7 +222,7 @@ func (h *PaymentHandler) PayQrcode(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
order := model.Order{
|
order := model.Order{
|
||||||
UserId: user.Id,
|
UserId: user.Id,
|
||||||
Mobile: user.Username,
|
Username: user.Username,
|
||||||
ProductId: product.Id,
|
ProductId: product.Id,
|
||||||
OrderNo: orderNo,
|
OrderNo: orderNo,
|
||||||
Subject: product.Name,
|
Subject: product.Name,
|
||||||
@ -267,7 +271,7 @@ func (h *PaymentHandler) PayQrcode(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
parse, err := url.Parse(h.App.Config.AlipayConfig.NotifyURL)
|
parse, err := url.Parse(notifyURL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
resp.ERROR(c, err.Error())
|
resp.ERROR(c, err.Error())
|
||||||
return
|
return
|
||||||
|
@ -10,7 +10,7 @@ type Order struct {
|
|||||||
BaseModel
|
BaseModel
|
||||||
UserId uint
|
UserId uint
|
||||||
ProductId uint
|
ProductId uint
|
||||||
Mobile string
|
Username string
|
||||||
OrderNo string
|
OrderNo string
|
||||||
Subject string
|
Subject string
|
||||||
Amount float64
|
Amount float64
|
||||||
|
@ -8,7 +8,7 @@ type Order struct {
|
|||||||
BaseVo
|
BaseVo
|
||||||
UserId uint `json:"user_id"`
|
UserId uint `json:"user_id"`
|
||||||
ProductId uint `json:"product_id"`
|
ProductId uint `json:"product_id"`
|
||||||
Mobile string `json:"mobile"`
|
Username string `json:"username"`
|
||||||
OrderNo string `json:"order_no"`
|
OrderNo string `json:"order_no"`
|
||||||
Subject string `json:"subject"`
|
Subject string `json:"subject"`
|
||||||
Amount float64 `json:"amount"`
|
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="邀请奖励">
|
<el-table-column label="邀请奖励">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>对话:{{ scope.row['reward']['chat_calls'] }}次</span>,
|
<span>对话:{{ scope.row['reward']['chat_calls'] }}次</span>,
|
||||||
<span>绘图:{{ scope.row['reward']['chat_calls'] }}次</span>
|
<span>绘图:{{ scope.row['reward']['img_calls'] }}次</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-table :data="items" :row-key="row => row.id" table-layout="auto">
|
<el-table :data="items" :row-key="row => row.id" table-layout="auto">
|
||||||
<el-table-column prop="order_no" label="订单号"/>
|
<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="subject" label="产品名称"/>
|
||||||
<el-table-column prop="amount" label="订单金额"/>
|
<el-table-column prop="amount" label="订单金额"/>
|
||||||
<el-table-column label="调用次数">
|
<el-table-column label="调用次数">
|
||||||
|
Loading…
Reference in New Issue
Block a user