This commit is contained in:
panda
2024-06-06 20:36:50 +08:00
parent 14c5b453b6
commit 41b61ebf1e
19 changed files with 41 additions and 288 deletions

View File

@@ -7,8 +7,8 @@ import (
"pandax/kit/biz"
"pandax/kit/model"
"pandax/kit/restfulx"
"pandax/kit/utils"
"pandax/pkg/global"
model2 "pandax/pkg/global/model"
"strings"
"time"
@@ -50,7 +50,7 @@ func (p *DeviceCmdLogApi) InsertDeviceCmdLog(rc *restfulx.ReqCtx) {
err := json.Unmarshal([]byte(data.CmdContent), &ms)
biz.ErrIsNil(err, "指令格式不正确")
biz.IsTrue(len(ms) > 0, "指令格式不正确")
data.Id = model2.GenerateID()
data.Id = utils.GenerateID()
data.State = "2"
data.RequestTime = time.Now().Format("2006-01-02 15:04:05")
go func() {