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