修改:1、修改routerDevice中InvokeService函数的对于ServiceParam的解析 2、修改makefile文件中输出windows可执行文件
This commit is contained in:
parent
9439617806
commit
aeb0bfc6be
4
Makefile
4
Makefile
|
@ -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"
|
|
@ -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 = ""
|
||||
|
|
Loading…
Reference in New Issue