feat: 跟踪任务HLR免登录接口

This commit is contained in:
TsMask
2024-09-20 14:56:54 +08:00
parent 68ef026bee
commit ee2cff7208
4 changed files with 96 additions and 13 deletions

View File

@@ -33,7 +33,7 @@ var NewTraceTaskHlr = &TraceTaskHlr{
},
}
// CDREventIMSImpl 跟踪_任务给HRL网元 数据层处理
// TraceTaskHlr 跟踪_任务给HRL网元 数据层处理
type TraceTaskHlr struct {
// 查询视图对象SQL
selectSql string
@@ -299,3 +299,18 @@ func (r *TraceTaskHlr) DeleteByIds(ids []string) int64 {
}
return results
}
// LastID 最后一条ID
func (r *TraceTaskHlr) LastID() int64 {
// 查询数据
querySql := "SELECT id as 'str' FROM trace_task_hlr ORDER BY id DESC LIMIT 1"
results, err := datasource.RawDB("", querySql, nil)
if err != nil {
logger.Errorf("query err %v", err)
return 0
}
if len(results) > 0 {
return parse.Number(results[0]["str"])
}
return 0
}