1
This commit is contained in:
parent
82a48afd58
commit
c652ff30c8
@ -11,7 +11,6 @@ import (
|
|||||||
"hepa-calc-api/global"
|
"hepa-calc-api/global"
|
||||||
"hepa-calc-api/utils"
|
"hepa-calc-api/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Pay struct{}
|
type Pay struct{}
|
||||||
@ -137,13 +136,14 @@ func (r *Pay) GetPayOrder(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 验证订单过期支付时间
|
// 验证订单过期支付时间
|
||||||
now := time.Now()
|
//now := time.Now()
|
||||||
validTime := time.Time(createdAt).Add(30 * time.Minute)
|
//validTime := time.Time(createdAt).Add(30 * time.Minute)
|
||||||
if validTime.Before(now) {
|
//if validTime.Before(now) {
|
||||||
c.JSON(http.StatusOK, gin.H{"code": 90001, "message": "订单已关闭", "data": nil})
|
// c.JSON(http.StatusOK, gin.H{"code": 90001, "message": "订单已关闭", "data": nil})
|
||||||
return
|
// return
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
fmt.Println(createdAt)
|
||||||
// 获取用户数据
|
// 获取用户数据
|
||||||
userDao := dao.UserDao{}
|
userDao := dao.UserDao{}
|
||||||
user, err := userDao.GetUserById(userId)
|
user, err := userDao.GetUserById(userId)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user