fuwencai 4 năm trước cách đây
mục cha
commit
e4081fb944
1 tập tin đã thay đổi với 5 bổ sung4 xóa
  1. 5 4
      service/deduplication.go

+ 5 - 4
service/deduplication.go

@@ -245,12 +245,11 @@ func (service *DeduplicationService) DataDeduplicateAndSave(data *deduplication.
 	infoIdList := strings.Split(data.InfoId, ",")
 	totalInfoCount := len(infoIdList)
 	err := orm.Table(tableName).Cols("info_id").Where(selectSql, valueList...).Find(&rs)
-	existInfoIdMap := map[string]bool{}
 	existIdList := []string{}
 	existIdMap := map[string]bool{}
 	for _, v := range rs {
 		existIdMap[v.InfoId] = true
-		if existInfoIdMap[v.InfoId] {
+		if existIdMap[v.InfoId] {
 			continue
 		}else {
 			existIdList = append(existIdList,v.InfoId)
@@ -267,8 +266,10 @@ func (service *DeduplicationService) DataDeduplicateAndSave(data *deduplication.
 		}, "判重查询失败"
 	}
 
-
-
+	//
+	//for _, v := range rs {
+	//
+	//}
 	// 新增
 	var insertList []entity.Deduplication
 	for _, id := range infoIdList {