Sfoglia il codice sorgente

fix: 为响应结构增加json标签

gaoyagang 1 anno fa
parent
commit
a834178d27
1 ha cambiato i file con 102 aggiunte e 102 eliminazioni
  1. 102 102
      datacenter_client/types.go

+ 102 - 102
datacenter_client/types.go

@@ -16,117 +16,117 @@ type (
 	}
 
 	WorkingPump struct {
-		Id           int64
-		ProjectId    int64
-		DeviceCode   string
-		FeedPressure float64
-		OutPressure  float64
-		Duration     int64
-		Current      float64
-		Frequency    float64
-		Lift         float64
-		Efficiency   float64
-		RunStatus    int64
-		FaultStatus  int64
-		CTime        string
+		Id           int64   `json:"id"`
+		ProjectId    int64   `json:"project_id"`
+		DeviceCode   string  `json:"device_code"`
+		FeedPressure float64 `json:"feed_pressure"`
+		OutPressure  float64 `json:"out_pressure"`
+		Duration     int64   `json:"duration"`
+		Current      float64 `json:"current"`
+		Frequency    float64 `json:"frequency"`
+		Lift         float64 `json:"lift"`
+		Efficiency   float64 `json:"efficiency"`
+		RunStatus    int64   `json:"run_status"`
+		FaultStatus  int64   `json:"fault_status"`
+		CTime        string  `json:"c_time"`
 	}
 
 	WorkingChest struct {
-		Id                  int64
-		ProjectId           int64
-		DeviceCode          string
-		Switch              int64
-		Level               float64
-		AgitatorStatus      int64
-		AgitatorDuration    int64
-		AgitatorFaultStatus int64
-		CTime               string
+		Id                  int64   `json:"id"`
+		ProjectId           int64   `json:"project_id"`
+		DeviceCode          string  `json:"device_code"`
+		Switch              int64   `json:"switch"`
+		Level               float64 `json:"level"`
+		AgitatorStatus      int64   `json:"agitator_status"`
+		AgitatorDuration    int64   `json:"agitator_duration"`
+		AgitatorFaultStatus int64   `json:"agitator_fault_status"`
+		CTime               string  `json:"c_time"`
 	}
 
 	WorkingRo struct {
-		Id                  int64
-		ProjectId           int64
-		DeviceCode          string
-		WaterTemperature    float64
-		FeedFlow_1St        float64
-		ConFlow_1St         float64
-		ProductFlow_1St     float64
-		FeedPressure_1St    float64
-		ConPressure_1St     float64
-		ProductPressure_1St float64
-		Tmp_1St             float64
-		Flux_1St            float64
-		Permeability_1St    float64
-		FeedFlow_2Nd        float64
-		ConFlow_2Nd         float64
-		ProductFlow_2Nd     float64
-		FeedPressure_2Nd    float64
-		ConPressure_2Nd     float64
-		ProductPressure_2Nd float64
-		Tmp_2Nd             float64
-		Flux_2Nd            float64
-		Permeability_2Nd    float64
-		FeedFlow_3Th        float64
-		ConFlow_3Th         float64
-		ProductFlow_3Th     float64
-		FeedPressure_3Th    float64
-		ConPressure_3Th     float64
-		ProductPressure_3Th float64
-		Tmp_3Th             float64
-		Flux_3Th            float64
-		Permeability_3Th    float64
-		FeedWqTurbidity     float64
-		FeedWqPh            int64
-		ProductWqPh         int64
-		FeedWqAl            float64
-		ProductWqAl         float64
-		FeedWqFe            float64
-		ProductWqFe         float64
-		FeedWqMn            float64
-		ProductWqMn         float64
-		FeedWqSio2          float64
-		ProductWqSio2       float64
-		FeedWqCod           float64
-		ProductWqCod        float64
-		FeedWqP             float64
-		ProductWqP          float64
-		Step                int64
-		CTime               string
+		Id                  int64   `json:"id"`
+		ProjectId           int64   `json:"project_id"`
+		DeviceCode          string  `json:"device_code"`
+		WaterTemperature    float64 `json:"water_temperature"`
+		FeedFlow_1St        float64 `json:"feed_flow_1_st"`
+		ConFlow_1St         float64 `json:"con_flow_1_st"`
+		ProductFlow_1St     float64 `json:"product_flow_1_st"`
+		FeedPressure_1St    float64 `json:"feed_pressure_1_st"`
+		ConPressure_1St     float64 `json:"con_pressure_1_st"`
+		ProductPressure_1St float64 `json:"product_pressure_1_st"`
+		Tmp_1St             float64 `json:"tmp_1_st"`
+		Flux_1St            float64 `json:"flux_1_st"`
+		Permeability_1St    float64 `json:"permeability_1_st"`
+		FeedFlow_2Nd        float64 `json:"feed_flow_2_nd"`
+		ConFlow_2Nd         float64 `json:"con_flow_2_nd"`
+		ProductFlow_2Nd     float64 `json:"product_flow_2_nd"`
+		FeedPressure_2Nd    float64 `json:"feed_pressure_2_nd"`
+		ConPressure_2Nd     float64 `json:"con_pressure_2_nd"`
+		ProductPressure_2Nd float64 `json:"product_pressure_2_nd"`
+		Tmp_2Nd             float64 `json:"tmp_2_nd"`
+		Flux_2Nd            float64 `json:"flux_2_nd"`
+		Permeability_2Nd    float64 `json:"permeability_2_nd"`
+		FeedFlow_3Th        float64 `json:"feed_flow_3_th"`
+		ConFlow_3Th         float64 `json:"con_flow_3_th"`
+		ProductFlow_3Th     float64 `json:"product_flow_3_th"`
+		FeedPressure_3Th    float64 `json:"feed_pressure_3_th"`
+		ConPressure_3Th     float64 `json:"con_pressure_3_th"`
+		ProductPressure_3Th float64 `json:"product_pressure_3_th"`
+		Tmp_3Th             float64 `json:"tmp_3_th"`
+		Flux_3Th            float64 `json:"flux_3_th"`
+		Permeability_3Th    float64 `json:"permeability_3_th"`
+		FeedWqTurbidity     float64 `json:"feed_wq_turbidity"`
+		FeedWqPh            int64   `json:"feed_wq_ph"`
+		ProductWqPh         int64   `json:"product_wq_ph"`
+		FeedWqAl            float64 `json:"feed_wq_al"`
+		ProductWqAl         float64 `json:"product_wq_al"`
+		FeedWqFe            float64 `json:"feed_wq_fe"`
+		ProductWqFe         float64 `json:"product_wq_fe"`
+		FeedWqMn            float64 `json:"feed_wq_mn"`
+		ProductWqMn         float64 `json:"product_wq_mn"`
+		FeedWqSio2          float64 `json:"feed_wq_sio_2"`
+		ProductWqSio2       float64 `json:"product_wq_sio_2"`
+		FeedWqCod           float64 `json:"feed_wq_cod"`
+		ProductWqCod        float64 `json:"product_wq_cod"`
+		FeedWqP             float64 `json:"feed_wq_p"`
+		ProductWqP          float64 `json:"product_wq_p"`
+		Step                int64   `json:"step"`
+		CTime               string  `json:"c_time"`
 	}
 
 	WorkingUf struct {
-		Id               int64
-		ProjectId        int64
-		DeviceCode       string
-		WaterTemperature float64
-		FeedFlow         float64
-		ConFlow          float64
-		ProductFlow      float64
-		FeedPressure     float64
-		ConPressure      float64
-		ProductPressure  float64
-		Tmp              float64
-		Flux             float64
-		Permeability     float64
-		FeedWqTurbidity  float64
-		FeedWqPh         int64
-		ProductWqPh      int64
-		FeedWqAl         float64
-		ProductWqAl      float64
-		FeedWqFe         float64
-		ProductWqFe      float64
-		FeedWqMn         float64
-		ProductWqMn      float64
-		FeedWqSio2       float64
-		ProductWqSio2    float64
-		FeedWqCod        float64
-		ProductWqCod     float64
-		FeedWqP          float64
-		ProductWqP       float64
-		Step             int64
-		FilterTime       float64
-		FilterCycle      int64
-		CTime            string
+		Id               int64   `json:"id"`
+		ProjectId        int64   `json:"project_id"`
+		DeviceCode       string  `json:"device_code"`
+		WaterTemperature float64 `json:"water_temperature"`
+		FeedFlow         float64 `json:"feed_flow"`
+		ConFlow          float64 `json:"con_flow"`
+		ProductFlow      float64 `json:"product_flow"`
+		FeedPressure     float64 `json:"feed_pressure"`
+		ConPressure      float64 `json:"con_pressure"`
+		ProductPressure  float64 `json:"product_pressure"`
+		Tmp              float64 `json:"tmp"`
+		Flux             float64 `json:"flux"`
+		Permeability     float64 `json:"permeability"`
+		FeedWqTurbidity  float64 `json:"feed_wq_turbidity"`
+		FeedWqPh         int64   `json:"feed_wq_ph"`
+		ProductWqPh      int64   `json:"product_wq_ph"`
+		FeedWqAl         float64 `json:"feed_wq_al"`
+		ProductWqAl      float64 `json:"product_wq_al"`
+		FeedWqFe         float64 `json:"feed_wq_fe"`
+		ProductWqFe      float64 `json:"product_wq_fe"`
+		FeedWqMn         float64 `json:"feed_wq_mn"`
+		ProductWqMn      float64 `json:"product_wq_mn"`
+		FeedWqSio2       float64 `json:"feed_wq_sio_2"`
+		ProductWqSio2    float64 `json:"product_wq_sio_2"`
+		FeedWqCod        float64 `json:"feed_wq_cod"`
+		ProductWqCod     float64 `json:"product_wq_cod"`
+		FeedWqP          float64 `json:"feed_wq_p"`
+		ProductWqP       float64 `json:"product_wq_p"`
+		Step             int64   `json:"step"`
+		FilterTime       float64 `json:"filter_time"`
+		FilterCycle      int64   `json:"filter_cycle"`
+		CTime            string  `json:"c_time"`
 	}
 )