From d07881bc2984e805dd15baecfd03f3afce39af7c Mon Sep 17 00:00:00 2001 From: ayflying Date: Mon, 27 Oct 2025 16:12:11 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E5=B0=9D=E8=AF=95=E4=BD=BF=E7=94=A8=E8=87=AA?= =?UTF-8?q?=E5=B7=B1=E7=9A=84=E4=BB=A3=E7=90=86=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/update.go | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/cmd/update.go b/cmd/update.go index 34d82b5..eaf3c65 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -112,9 +112,24 @@ var ( FileUrl: url[v.S3], }) if err != nil { - Proxy := g.Cfg().MustGet(ctx, "update_proxy", "http://192.168.50.170:10808").String() - g.Log().Debugf(ctx, "切换代理进行上传:err=%v", err) - get, err = client.Proxy(Proxy).Post(ctx, address+"/callback/update", &UpdateReq{ + // 读取HTTP代理环境变量(小写/大写通常都兼容,部分系统可能用大写) + httpProxy := os.Getenv("http_proxy") + if httpProxy == "" { + httpProxy = os.Getenv("HTTP_PROXY") + } + if httpProxy == "" { + // 读取HTTPS代理环境变量 + httpProxy = os.Getenv("https_proxy") + if httpProxy == "" { + httpProxy = os.Getenv("HTTPS_PROXY") + } + } + // 如果没有读取到本地的代理,使用配置上传 + if httpProxy == "" { + httpProxy = g.Cfg().MustGet(ctx, "update_proxy", "http://192.168.50.173:10808").String() + } + g.Log().Debugf(ctx, "切换代理进行上传:ip=%v,err=%v", httpProxy, err) + get, err = client.Proxy(httpProxy).Post(ctx, address+"/callback/update", &UpdateReq{ FileUrl: url[v.S3], }) } From ba0f9bfd98446019d73d299dd2e65ddec2ee5b27 Mon Sep 17 00:00:00 2001 From: liaoyulong Date: Mon, 27 Oct 2025 18:20:26 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=9A=E7=94=A8?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/time.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/time.go b/tools/time.go index 8ffe862..bad3ff1 100644 --- a/tools/time.go +++ b/tools/time.go @@ -152,3 +152,8 @@ func (m *timeMod) CheckIsBeRwd(createdTime, lastRwdTime time.Time, _now ...time. // 如果是,则说明还没领过,可以领取 return lastRwdTime.Before(refreshToday) } + +// 获取指定时间的本月最后一刻 +func (m *timeMod) EndOfMonth(t time.Time) time.Time { + return time.Date(t.Year(), t.Month()+1, 1, 0, 0, 0, 0, t.Location()).Add(-time.Second) +} From f3e1ad74b51d2a71c6819017aced993559427f69 Mon Sep 17 00:00:00 2001 From: liaoyulong Date: Tue, 28 Oct 2025 20:43:25 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=90=8E=E7=BB=ADdata?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E5=88=B0=E7=A9=BAmap=E4=B8=BAnil=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/logic/gameAct/gameAct.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/logic/gameAct/gameAct.go b/internal/logic/gameAct/gameAct.go index 2209b6a..5056ec7 100644 --- a/internal/logic/gameAct/gameAct.go +++ b/internal/logic/gameAct/gameAct.go @@ -15,6 +15,7 @@ import ( service2 "github.com/ayflying/utility_go/service" "github.com/ayflying/utility_go/tools" "github.com/gogf/gf/v2/container/gset" + "github.com/gogf/gf/v2/container/gvar" "github.com/gogf/gf/v2/errors/gerror" "github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/os/gctx" @@ -68,8 +69,8 @@ func (s *sGameAct) Info(uid int64, actId int) (data *g.Var, err error) { Uid: uid, ActId: actId, }).Fields("action").OrderDesc("updated_at").Value() - getDb.Scan(&data) - + // getDb.Scan(&data) + data = gvar.New(getDb) if data == nil || data.IsEmpty() { return }