mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-08 02:03:42 +08:00
opt: clear space in the reward transfer number
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"chatplus/utils/resp"
|
||||
"github.com/gin-gonic/gin"
|
||||
"gorm.io/gorm"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type RewardHandler struct {
|
||||
@@ -75,6 +76,9 @@ func (h *RewardHandler) Verify(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// 移除转账单号中间的空格,防止有人复制的时候多复制了空格
|
||||
data.TxId = strings.ReplaceAll(data.TxId, " ", "")
|
||||
|
||||
var item model.Reward
|
||||
res := h.db.Where("tx_id = ?", data.TxId).First(&item)
|
||||
if res.Error != nil {
|
||||
|
||||
Reference in New Issue
Block a user