liuxiulin 2 dní pred
rodič
commit
ef9102c00d

+ 2 - 2
services/scene-service/internal/service/manager/executer.go

@@ -6,6 +6,7 @@ import (
 	"sparrow/pkg/rpcs"
 	"sparrow/pkg/server"
 	"sparrow/pkg/utils"
+	"strings"
 	"time"
 )
 
@@ -112,8 +113,7 @@ func (a *TaskExecutor) saveHis(id string, conditionId []string) error {
 	url := "http://127.0.0.1:8199/iot/v1/scene_history"
 	body := make(map[string]interface{})
 	body["scene_id"] = id
-	body["time"] = time.Now()
-	body["condition_id"] = conditionId
+	body["condition_id"] = strings.Join(conditionId, ",")
 	_, err := client.Post(url, "application/json", gjson.New(body))
 	if err != nil {
 		server.Log.Errorf("sync his error:%s", err.Error())