feat: kpi指标标题管理接口

This commit is contained in:
TsMask
2025-08-21 11:03:08 +08:00
parent 2bf2ff5947
commit a382fcd05f
6 changed files with 270 additions and 25 deletions

View File

@@ -141,6 +141,36 @@ func (r KpiReport) FindTitle(neType string) []model.KpiTitle {
return r.kpiReportRepository.SelectKPITitle(neType)
}
// FindByPage 根据条件分页查询
func (r KpiReport) TitleFindByPage(query map[string]string) ([]model.KpiTitle, int64) {
return r.kpiReportRepository.TitleSelectByPage(query)
}
// TitleFind 查询信息
func (r KpiReport) TitleFind(param model.KpiTitle) []model.KpiTitle {
return r.kpiReportRepository.TitleSelect(param)
}
// TitleUpdate 更新信息
func (r KpiReport) TitleUpdate(param model.KpiTitle) int64 {
return r.kpiReportRepository.TitleUpdate(param)
}
// TitleDeleteByIds 批量删除信息
func (r KpiReport) TitleDeleteByIds(ids []int64) (int64, error) {
rows := r.kpiReportRepository.TitleDeleteByIds(ids)
if rows > 0 {
return rows, nil
}
// 删除信息失败!
return 0, fmt.Errorf("delete fail")
}
// TitleInsert 新增信息
func (r KpiReport) TitleInsert(param model.KpiTitle) int64 {
return r.kpiReportRepository.TitleInsert(param)
}
// UPFTodayFlowFind 查询UPF总流量 N3上行 N6下行
// day 统计天数
// down * 8 / 1000 / 1000 单位M