[优化] 代码优化

This commit is contained in:
ryan
2026-05-31 20:29:15 +08:00
parent 97c10b8d0b
commit 7ab11154e3
13 changed files with 197 additions and 554 deletions
-6
View File
@@ -50,12 +50,6 @@ func CountApplyLogs(nodeID string) (total int64, err error) {
return total, err
}
func GetLatestApplyLog(nodeID string) (*ApplyLog, error) {
log := &ApplyLog{}
err := DB.Where("node_id = ?", nodeID).Order("id desc").First(log).Error
return log, err
}
func GetLatestApplyLogsByNodeIDs(nodeIDs []string) (map[string]*ApplyLog, error) {
result := make(map[string]*ApplyLog)
if len(nodeIDs) == 0 {