From 3cfbd8db9b4f643c618100865f7b745568cf9c13 Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Tue, 11 Mar 2025 18:09:04 +0800 Subject: [PATCH] userid tolowner --- service/checkin.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/service/checkin.go b/service/checkin.go index dc925c8..d8ea98e 100644 --- a/service/checkin.go +++ b/service/checkin.go @@ -6,6 +6,7 @@ import ( "git.u8t.cn/open/gosdk/qyweixin" log "github.com/sirupsen/logrus" "github.com/smbrave/goutil" + "strings" ) type Checkin struct { @@ -44,7 +45,7 @@ func (c *Checkin) SyncCheckin(corpId int64, startDay, endDay string) error { } func (c *Checkin) saveToDB(corpId int64, user *qyweixin.UserCheckIn) error { - checkin, err := dao.NewCheckinDao().GetByDay(user.UserId, user.Day) + checkin, err := dao.NewCheckinDao().GetByDay(strings.ToLower(user.UserId), user.Day) if err != nil { log.Errorf("db error :%s", err.Error()) return err @@ -54,7 +55,7 @@ func (c *Checkin) saveToDB(corpId int64, user *qyweixin.UserCheckIn) error { checkin = new(model.Checkin) checkin.Day = user.Day checkin.Month = user.Month - checkin.Username = user.UserId + checkin.Username = strings.ToLower(user.UserId) isNew = true }