u
This commit is contained in:
1 parent
63b168affc
commit
069b4506e4
29 files changed
+1077
-1116
No files matched your search
@@ -106,7 +106,7 @@ func loginDefault(c *router.Context) error {
|
||||
|
||||
routinex.Go(func() {
|
||||
kv := mapx.New().SetKV(
|
||||
"last_login_time", timex.NowString(),
|
||||
"last_login_time", timex.DateTimeString(),
|
||||
)
|
||||
_, _ = db.UpdateOne("user_info", "id", userId, kv)
|
||||
})
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"base-go-v2/internal/router"
|
||||
"base-go-v2/internal/utils/idgen"
|
||||
"base-go-v2/internal/utils/mapx"
|
||||
"base-go-v2/internal/utils/timex"
|
||||
"fmt"
|
||||
"sort"
|
||||
"time"
|
||||
@@ -272,6 +273,8 @@ func updateMoneyRecord(c *router.Context) error {
|
||||
updateRecord.SetKV("remark", remark)
|
||||
}
|
||||
|
||||
updateRecord.SetKV("update_time", timex.DateTimeString())
|
||||
|
||||
updateOne, err := db.UpdateOne("money_record", "id", recordId, updateRecord)
|
||||
if err != nil {
|
||||
return c.AddError(err)
|
||||
|
||||
@@ -7,8 +7,8 @@ func NowTime() time.Time {
|
||||
return time.Now()
|
||||
}
|
||||
|
||||
// NowString 返回当前时间的字符串格式:YYYY-MM-DD HH:mm:ss
|
||||
func NowString() string {
|
||||
// DateTimeString 返回当前时间的字符串格式:YYYY-MM-DD HH:mm:ss
|
||||
func DateTimeString() string {
|
||||
return time.Now().Format("2006-01-02 15:04:05")
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user