test_user hace 1 año
padre
commit
9aee55861f
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      service/schedule_service.go

+ 3 - 2
service/schedule_service.go Ver fichero

@@ -354,8 +354,9 @@ func UpdateScheduleTwo(schone models.Schedule, schtwo models.Schedule) {
354 354
 	schtwo.ScheduleType = tempTypeID
355 355
 	schone.IsExport = 9000
356 356
 	schtwo.IsExport = 9000
357
-	utx.Save(&schone)
358
-	utx.Save(&schtwo)
357
+
358
+	utx.Model(&models.Schedule{}).Where("id = ?", schone.ID).Updates(map[string]interface{}{"partition_id": schone.PartitionId, "bed_id": schone.BedId, "schedule_type": schone.ScheduleType, "is_export": 9000})
359
+	utx.Model(&models.Schedule{}).Where("id = ?", schtwo.ID).Updates(map[string]interface{}{"partition_id": schtwo.PartitionId, "bed_id": schtwo.BedId, "schedule_type": schtwo.ScheduleType, "is_export": 9000})
359 360
 
360 361
 }
361 362