修复编译错误:添加strings包导入和修复时间类型转换
- announcements.go: 添加strings包导入 - devices.go: 添加strings包导入 - cloud.go: 修复CreatedAt时间类型转换为字符串
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"verification-platform-backend/internal/database"
|
||||
"verification-platform-backend/internal/model"
|
||||
|
||||
@@ -761,7 +761,7 @@ func handleGetCloudVariableRecords(c *gin.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
if strings.Contains(strings.ToLower(record.CreatedAt), searchLower) {
|
||||
if strings.Contains(strings.ToLower(record.CreatedAt.Format("2006-01-02 15:04:05")), searchLower) {
|
||||
filteredRecords = append(filteredRecords, record)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
"verification-platform-backend/internal/database"
|
||||
"verification-platform-backend/internal/model"
|
||||
|
||||
Reference in New Issue
Block a user