From bf4ee1f6ab8f50718fb9666821a7f5b74454ccbc Mon Sep 17 00:00:00 2001 From: zouap Date: Tue, 16 Nov 2021 17:56:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=A0=E5=85=A5=E6=9C=88?= =?UTF-8?q?=E4=BB=BD=EF=BC=8C=E5=A6=82=E6=9E=9C=E4=B8=8D=E8=B6=B31?= =?UTF-8?q?=E6=9C=88=EF=BC=8C=E5=88=99=E4=BD=BF=E7=94=A81=E6=9C=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/user_business_analysis.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index 19a24dbac..1223224ee 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -674,5 +674,8 @@ func subMonth(t1, t2 time.Time) (month int) { } monthInterval %= 12 month = yearInterval*12 + monthInterval + if month == 0 { + month = 1 + } return month }