From 2bf9cf1232e23886beb9a306b4750e4de695848c Mon Sep 17 00:00:00 2001 From: like Date: Wed, 1 Jun 2022 14:11:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E4=BD=BF=E7=94=A8=E6=9C=9F?= =?UTF-8?q?=E9=99=90=E6=97=B6=E9=97=B4=E9=80=BB=E8=BE=91=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .beagle.yml | 6 +++--- src/handler/proxyhandler.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.beagle.yml b/.beagle.yml index c96f3a9..cb29a05 100644 --- a/.beagle.yml +++ b/.beagle.yml @@ -50,7 +50,7 @@ steps: base: registry.cn-qingdao.aliyuncs.com/wod/alpine-glibc:3.12 dockerfile: .beagle/dockerfile repo: gzgajzapi/apaas-meshproxy - Version: "v3.0.7" + Version: "v3.0.8" channel: alpha args: "TARGETOS=linux,TARGETARCH=amd64" registry: hub.wodcloud.com @@ -87,8 +87,8 @@ steps: REGISTRY_PASSWORD: from_secret: REGISTRY_PASSWORD settings: - source: hub.wodcloud.com/gzgajzapi/apaas-meshproxy:v3.0.7-alpha - target: hub.wodcloud.com/gzgajzapi/apaas-meshproxy:v3.0.7 + source: hub.wodcloud.com/gzgajzapi/apaas-meshproxy:v3.0.8-alpha + target: hub.wodcloud.com/gzgajzapi/apaas-meshproxy:v3.0.8 registry: hub.wodcloud.com --- diff --git a/src/handler/proxyhandler.go b/src/handler/proxyhandler.go index 7912223..8b3b970 100644 --- a/src/handler/proxyhandler.go +++ b/src/handler/proxyhandler.go @@ -80,14 +80,14 @@ func Proxy(c *gin.Context) { requestStartTime := FormatDateToCarbon(proxyData.RequestStartTime) requestEndTime := FormatDateToCarbon(proxyData.RequestEndTime) - now := carbon.Now(carbon.Shanghai) - if requestStartTime.Gt(now) { + today := carbon.Parse(carbon.Now().ToDateString(), carbon.Shanghai) + if requestStartTime.Gt(today) { res := model.WebRes{} res.ErrMsg = `申请使用期限未开始` c.JSON(200, res) return } - if requestEndTime.Lt(now) { + if requestEndTime.Lt(today) { res := model.WebRes{} res.ErrMsg = `申请使用期限已过期` c.JSON(200, res) -- 2.26.0