From 288b241fa03028b6365b3df5ed2eb3e010db2fb3 Mon Sep 17 00:00:00 2001 From: jiangyong27 Date: Tue, 22 Apr 2025 11:28:16 +0800 Subject: [PATCH] daywwek --- server/api/checkin.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)