feat: 新增统一文件模块,统一文件操作

This commit is contained in:
meilin.huang
2024-10-21 22:27:42 +08:00
parent 6343173cf8
commit ea3c70a8a8
71 changed files with 1642 additions and 1216 deletions

View File

@@ -9,10 +9,16 @@ import (
const DefaultDateTimeFormat = "2006-01-02 15:04:05"
// DefaultFormat 使用默认格式进行格式化: 2006-01-02 15:04:05
func DefaultFormat(time time.Time) string {
return time.Format(DefaultDateTimeFormat)
}
// TimeNo 获取当前时间编号格式为20060102150405
func TimeNo() string {
return time.Now().Format("20060102150405")
}
func NewNullTime(t time.Time) NullTime {
return NullTime{
NullTime: sql.NullTime{