...
|
...
|
@@ -55,14 +55,14 @@ func (cmd *SearchEmployeeAttendanceQuery) Valid(validation *validation.Validatio |
|
|
cmd.Offset, cmd.Limit = domain.Pagination(cmd.PageNumber, cmd.PageSize)
|
|
|
var err error
|
|
|
if len(cmd.BeginTime) > 0 {
|
|
|
if cmd.SignBeginTime, err = time.ParseInLocation("2006-01-02 15:04:05", cmd.BeginTime, time.Local); err != nil {
|
|
|
if cmd.SignBeginTime, err = time.ParseInLocation("2006-01-02", cmd.BeginTime, time.Local); err != nil {
|
|
|
log.Logger.Error(err.Error())
|
|
|
validation.Error("开始时间有误")
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
if len(cmd.EndTime) > 0 {
|
|
|
if cmd.SignEndTime, err = time.ParseInLocation("2006-01-02 15:04:05", cmd.EndTime, time.Local); err != nil {
|
|
|
if cmd.SignEndTime, err = time.ParseInLocation("2006-01-02", cmd.EndTime, time.Local); err != nil {
|
|
|
log.Logger.Error(err.Error())
|
|
|
validation.Error("结束时间有误")
|
|
|
return
|
...
|
...
|
|