正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
@@ -55,14 +55,14 @@ func (cmd *SearchEmployeeAttendanceQuery) Valid(validation *validation.Validatio | @@ -55,14 +55,14 @@ func (cmd *SearchEmployeeAttendanceQuery) Valid(validation *validation.Validatio | ||
55 | cmd.Offset, cmd.Limit = domain.Pagination(cmd.PageNumber, cmd.PageSize) | 55 | cmd.Offset, cmd.Limit = domain.Pagination(cmd.PageNumber, cmd.PageSize) |
56 | var err error | 56 | var err error |
57 | if len(cmd.BeginTime) > 0 { | 57 | if len(cmd.BeginTime) > 0 { |
58 | - if cmd.SignBeginTime, err = time.ParseInLocation("2006-01-02 15:04:05", cmd.BeginTime, time.Local); err != nil { | 58 | + if cmd.SignBeginTime, err = time.ParseInLocation("2006-01-02", cmd.BeginTime, time.Local); err != nil { |
59 | log.Logger.Error(err.Error()) | 59 | log.Logger.Error(err.Error()) |
60 | validation.Error("开始时间有误") | 60 | validation.Error("开始时间有误") |
61 | return | 61 | return |
62 | } | 62 | } |
63 | } | 63 | } |
64 | if len(cmd.EndTime) > 0 { | 64 | if len(cmd.EndTime) > 0 { |
65 | - if cmd.SignEndTime, err = time.ParseInLocation("2006-01-02 15:04:05", cmd.EndTime, time.Local); err != nil { | 65 | + if cmd.SignEndTime, err = time.ParseInLocation("2006-01-02", cmd.EndTime, time.Local); err != nil { |
66 | log.Logger.Error(err.Error()) | 66 | log.Logger.Error(err.Error()) |
67 | validation.Error("结束时间有误") | 67 | validation.Error("结束时间有误") |
68 | return | 68 | return |
-
请 注册 或 登录 后发表评论