fix: 网元软件安装log写入本地文件观察

This commit is contained in:
TsMask
2025-06-11 18:26:23 +08:00
parent cf51e80dc5
commit fa6bc9720f
10 changed files with 95 additions and 57 deletions

View File

@@ -484,7 +484,7 @@ func (s *UDMVolteIMSController) Export(c *gin.Context) {
data = append(data, []string{v.IMSI, v.MSISDN, v.Tag, v.VNI})
}
// 输出到文件
if err := file.WriterFileTXT(data, ",", filePath); err != nil {
if err := file.WriterFileTXTLine(data, ",", filePath); err != nil {
c.JSON(200, resp.ErrMsg(err.Error()))
return
}
@@ -582,7 +582,7 @@ func (s *UDMVolteIMSController) Import(c *gin.Context) {
go s.udmVolteIMSService.InsertData(neInfo.NeId, "csv", data)
}
if strings.HasSuffix(body.UploadPath, ".txt") {
data := file.ReadFileTXT(",", localFilePath)
data := file.ReadFileTXTLine(",", localFilePath)
go s.udmVolteIMSService.InsertData(neInfo.NeId, "txt", data)
}
}