userid tolowner
This commit is contained in:
parent
111b3b0a5a
commit
3cfbd8db9b
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue