From 033f3d5caa704c34806f10f135c9bfe918a36760 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期二, 22 八月 2023 18:36:26 +0800
Subject: [PATCH] 兼容前端字段类型错误
---
constvar/const.go | 3 ++-
model/device_plc.go | 2 +-
docs/swagger.yaml | 2 +-
docs/docs.go | 2 +-
docs/swagger.json | 2 +-
5 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/constvar/const.go b/constvar/const.go
index 20868e5..c64e44b 100644
--- a/constvar/const.go
+++ b/constvar/const.go
@@ -11,7 +11,8 @@
type PlcStartAddressType string
const (
- PlcStartAddressTypeFinishNumber = "1"
+ PlcStartAddressTypeFinishNumber = 1
+ PlcStartAddressTypeTotalNumber = 2
)
const (
diff --git a/docs/docs.go b/docs/docs.go
index b32229d..13c6d5b 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -576,7 +576,7 @@
"properties": {
"fieldName": {
"description": "瀵瑰簲绯荤粺瀛楁",
- "type": "string"
+ "type": "integer"
},
"length": {
"description": "鏁版嵁闀垮害",
diff --git a/docs/swagger.json b/docs/swagger.json
index ae5d0c7..8f746a2 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -564,7 +564,7 @@
"properties": {
"fieldName": {
"description": "瀵瑰簲绯荤粺瀛楁",
- "type": "string"
+ "type": "integer"
},
"length": {
"description": "鏁版嵁闀垮害",
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 67965d9..ab9ad60 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -94,7 +94,7 @@
properties:
fieldName:
description: 瀵瑰簲绯荤粺瀛楁
- type: string
+ type: integer
length:
description: 鏁版嵁闀垮害
type: integer
diff --git a/model/device_plc.go b/model/device_plc.go
index ae1e43c..e37a718 100644
--- a/model/device_plc.go
+++ b/model/device_plc.go
@@ -29,7 +29,7 @@
StartAddress int `json:"startAddress"` // 鏁版嵁璧峰鍦板潃
Length int `json:"length"` // 鏁版嵁闀垮害
Type string `json:"type"` // 鏁版嵁绫诲瀷
- FieldName string `json:"fieldName"` // 瀵瑰簲绯荤粺瀛楁
+ FieldName int `json:"fieldName"` // 瀵瑰簲绯荤粺瀛楁
}
DevicePlcSearch struct {
--
Gitblit v1.8.0