Skip to content

Commit 25036be

Browse files
committed
remove unused func GetLastReceiveTimeAuditPlanSQLV2
1 parent e1e3740 commit 25036be

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

sqle/model/instance_audit_plan.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -181,22 +181,6 @@ func (s *Storage) GetLatestStartTimeAuditPlanSQLV2(sourceId uint, typ string) (s
181181
return info.StartTime, err
182182
}
183183

184-
func (s *Storage) GetLastReceiveTimeAuditPlanSQLV2(sourceId uint, typ string) (string, error) {
185-
var info = struct {
186-
LastReceivedTime string `gorm:"column:last_received_time"`
187-
}{}
188-
err := s.db.Raw(`
189-
SELECT
190-
MAX(
191-
JSON_UNQUOTE(JSON_EXTRACT(info, '$.last_receive_timestamp'))
192-
)
193-
AS last_received_time
194-
FROM sql_manage_records
195-
WHERE source_id = ? AND source = ? AND deleted_at is NULL
196-
`, sourceId, typ).Scan(&info).Error
197-
return info.LastReceivedTime, err
198-
}
199-
200184
// 此表对于来源是扫描任务的相关sql, 目前仅在采集和审核时会更新, 如有其他场景更新此表, 需要考虑更新后会触发审核影响
201185
// 如有其他sql业务相关字段补充, 可新增至SQLManageRecordProcess中
202186
type SQLManageRecord struct {

0 commit comments

Comments
 (0)