revt: 回退网元软件包类型字段变更

This commit is contained in:
TsMask
2024-05-27 19:02:33 +08:00
parent 83192c3172
commit 57a18656df
6 changed files with 33 additions and 34 deletions

View File

@@ -47,7 +47,7 @@ func (r *NeSoftwareImpl) Insert(neSoftware model.NeSoftware) string {
inserId := r.neSoftwareRepository.Insert(neSoftware)
if inserId != "" {
// 更新同类型的新包版本
neVersions := NewNeVersionImpl.SelectList(model.NeVersion{NeType: neSoftware.Type})
neVersions := NewNeVersionImpl.SelectList(model.NeVersion{NeType: neSoftware.NeType})
if len(neVersions) > 0 {
for _, neVersion := range neVersions {
neVersion.NewName = neSoftware.Name
@@ -68,7 +68,7 @@ func (r *NeSoftwareImpl) Update(neSoftware model.NeSoftware) int64 {
if rows > 0 {
// 更新同类型的新包版本
neVersions := NewNeVersionImpl.SelectList(model.NeVersion{
NeType: neSoftware.Type,
NeType: neSoftware.NeType,
Status: "3",
})
if len(neVersions) > 0 {
@@ -112,9 +112,9 @@ func (r *NeSoftwareImpl) DeleteByIds(ids []string) (int64, error) {
}
// CheckUniqueTypeAndNameAndVersion 校验网元类型和文件名版本是否唯一
func (r *NeSoftwareImpl) CheckUniqueTypeAndNameAndVersion(softwareType, name, version, id string) bool {
func (r *NeSoftwareImpl) CheckUniqueTypeAndNameAndVersion(neType, name, version, id string) bool {
uniqueId := r.neSoftwareRepository.CheckUniqueTypeAndNameAndVersion(model.NeSoftware{
Type: softwareType,
NeType: neType,
Name: name,
Version: version,
})