From e03a89bd26ee460573eeb4d919c2f875c4fb4935 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 11 Jan 2023 11:54:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E5=BC=BA=E8=A1=8C=E5=8E=BB=E6=8E=89CSV=E6=9C=AB=E5=B0=BE?= =?UTF-8?q?=E7=9A=84=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- models/user_business_analysis.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/models/user_business_analysis.go b/models/user_business_analysis.go index 8e5e15dbd..b1fe53bd9 100644 --- a/models/user_business_analysis.go +++ b/models/user_business_analysis.go @@ -893,12 +893,14 @@ func getBonusWeekDataMap() map[int64][]int { //read csv lines := strings.Split(csvContent, "\n") for j := 1; j < len(lines); j++ { + if strings.HasSuffix(lines[j], "\01503d") { + lines[j] = lines[j][0 : len(lines[j])-len("\01503d")] + } + log.Info("aLine=" + lines[j]) aLine := strings.Split(lines[j], ",") if len(aLine) < 4 { continue } - log.Info("aLine=" + lines[j]) - userId := getInt64Value(aLine[0]) order := getIntValue(aLine[2]) money := getIntValue(aLine[3])