修改:1、修改routerDevice中InvokeService函数的对于ServiceParam的解析 2、修改makefile文件中输出windows可执行文件

This commit is contained in:
pengwang 2021-07-01 22:53:40 +08:00
parent 9439617806
commit aeb0bfc6be
2 changed files with 5 additions and 5 deletions

View File

@ -12,6 +12,6 @@ linux-386:
linux-amd64:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o openGW -ldflags "-s -w"
windows-386:
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -o openGW -ldflags "-s -w"
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -o openGW.exe -ldflags "-s -w"
windows-amd64:
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o openGW -ldflags "-s -w"
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o openGW.exe -ldflags "-s -w"

View File

@ -1358,9 +1358,8 @@ func apiInvokeService(context *gin.Context) {
CollInterfaceName string
DeviceName string
ServiceName string
ServiceParam string
ServiceParam map[string]interface{}
}{}
err := json.Unmarshal(bodyBuf[:n], &serviceInfo)
if err != nil {
fmt.Println("serviceInfo json unMarshall err,", err)
@ -1380,7 +1379,8 @@ func apiInvokeService(context *gin.Context) {
cmd.CollInterfaceName = serviceInfo.CollInterfaceName
cmd.DeviceName = serviceInfo.DeviceName
cmd.FunName = serviceInfo.ServiceName
cmd.FunPara = serviceInfo.ServiceParam
paramStr, _ := json.Marshal(serviceInfo.ServiceParam)
cmd.FunPara = string(paramStr)
if n.CommunicationManageAddEmergency(cmd) == true {
aParam.Code = "0"
aParam.Message = ""