fix: 网元软件包新增找到已存在的删除后重新添加

This commit is contained in:
TsMask committed 2024-04-25 14:24:34 +08:00
1 parent a9af655d63
commit 965bb899ac
2 files changed
+21 -10

No files matched your search

@@ -71,14 +71,14 @@ func (r *NeSoftwareImpl) Update(neSoftware model.NeSoftware) int64 {
if rows > 0 {
// 更新同类型的新包版本
neVersions := NewNeVersionImpl.SelectList(model.NeVersion{
NeType: neSoftware.NeType,
NewPath: neSoftware.Path,
Status: "3",
NeType: neSoftware.NeType,
Status: "3",
})
if len(neVersions) > 0 {
for _, neVersion := range neVersions {
neVersion.NewName = neSoftware.Name
neVersion.NewVersion = neSoftware.Version
neVersion.NewPath = neSoftware.Path
neVersion.Status = "3"
neVersion.UpdateBy = neSoftware.UpdateBy
NewNeVersionImpl.Update(neVersion)