diff --git a/server/api/checkin.go b/server/api/checkin.go index 39f1729..f0284fc 100644 --- a/server/api/checkin.go +++ b/server/api/checkin.go @@ -2,8 +2,10 @@ package api import ( "enterprise/common/model" + "fmt" "github.com/smbrave/goutil" "github.com/spf13/cast" + "time" ) type BaseRequest struct { @@ -49,7 +51,8 @@ type Checkin struct { func (c *Checkin) From(m *model.Checkin) { c.Id = cast.ToString(m.Id) c.Username = m.Username - c.Day = m.Day + dayTime, _ := time.ParseInLocation("2006-01-02", m.Day, time.Local) + c.Day = fmt.Sprintf("%s(%s)", c.Day, goutil.TimeToWeek(dayTime.Unix())) c.Month = m.Month c.StartTime = goutil.TimeToDateTime(m.StartTime) c.EndTime = goutil.TimeToDateTime(m.EndTime)