Explorar o código

fix:管理规则提取

zqbao hai 6 meses
pai
achega
31988a2afb
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      services/excel/luck_sheet_table.go

+ 3 - 1
services/excel/luck_sheet_table.go

@@ -218,7 +218,9 @@ func generateRuleScopeIndexMap(items []*models.ExcelInfoRuleMappingView) (ruleSc
 		}
 		if len(coords) == 2 {
 			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
 		}
 	}