Przeglądaj źródła

fix:管理规则提取

zqbao 6 miesięcy temu
rodzic
commit
d934ecb607
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      services/excel/lucky_sheet_table.go

+ 3 - 1
services/excel/lucky_sheet_table.go

@@ -315,7 +315,9 @@ func generateRuleScopeIndexMap(items []*excel.ExcelInfoRuleMappingView) (ruleSco
 		}
 		}
 		if len(coords) == 2 {
 		if len(coords) == 2 {
 			x, y := coordIntArr[0]-1, coordIntArr[1]-1
 			x, y := coordIntArr[0]-1, coordIntArr[1]-1
-			ruleScopeMap[y] = make(map[int]int)
+			if _, ok := ruleScopeMap[y]; !ok {
+				ruleScopeMap[y] = make(map[int]int)
+			}
 			ruleScopeMap[y][x] = item.ExcelInfoRuleMappingId
 			ruleScopeMap[y][x] = item.ExcelInfoRuleMappingId
 		}
 		}
 	}
 	}