From aa5fbd5dc6b79d7a0801ab5ee045dfa6ab77b2f8 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期五, 07 八月 2020 16:47:28 +0800
Subject: [PATCH] use hik old server
---
conf/app.conf | 4 +++-
service/carService.go | 21 ++++++++-------------
2 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/conf/app.conf b/conf/app.conf
index 58fb34c..93a6f99 100644
--- a/conf/app.conf
+++ b/conf/app.conf
@@ -17,4 +17,6 @@
pushPackageName = uni.UNIEDF0B5C
pushBaseUrl = https://restapi.getui.com/v2/
dbUrl = conf/app.db
-hikUrl = https://111.205.161.131:1443
\ No newline at end of file
+hikUrl = https://111.205.161.131:443
+hikAppKey = 26577698
+hikAppSecret = ZHhxujl06e0e5jsJLaiB
\ No newline at end of file
diff --git a/service/carService.go b/service/carService.go
index b813db6..a688cd3 100644
--- a/service/carService.go
+++ b/service/carService.go
@@ -16,8 +16,8 @@
func NewCarService() *CarService {
return &CarService{
hikUtil: &reqUtil.HikHttpUtil{
- AppKey: hikAppKey,
- AppSecret: hikAppSecret,
+ AppKey: beego.AppConfig.String("hikAppKey"),
+ AppSecret: beego.AppConfig.String("hikAppSecret"),
ReqHost: beego.AppConfig.String("hikUrl"),
},
}
@@ -54,11 +54,6 @@
UpdateTime string `json:"updateTime"`
}
-var (
- hikAppKey = "27107808"
- hikAppSecret = "BEQiCoBTYcJX2d4KzbVK"
-)
-
//鑾峰彇娴峰悍鍋滆溅搴撳垪琛�
func (sv *CarService) getHikParkList() []ParkInfo {
@@ -94,12 +89,12 @@
ParkSysCode string `json:"parkSyscode"` //鍋滆溅搴撳敮涓�鏍囪瘑鐮�
ParkName string `json:"parkName"` //鍋滆溅搴撳悕绉�
ParentParkSyscode string `json:"parentParkSyscode"` //鐖跺仠杞﹀簱鍞竴鏍囪瘑
- TotalPlace int `json:"totalPlace"` //鍋滆溅搴撹溅浣嶆�绘暟
- TotalPermPlace int `json:"totalPermPlace"` //鍋滆溅搴撳浐瀹氳溅浣嶆�绘暟
- TotalReservePlace int `json:"totalReservePlace"` //鍋滆溅浣嶉绾﹁溅浣嶆�绘暟
- LeftPlace int `json:"leftPlace"` //鍋滆溅搴撹溅浣嶅墿浣欐暟
- LeftPermPlace int `json:"leftPermPlace"` //鍋滆溅搴撳浐瀹氳溅浣嶅墿浣欐暟
- LeftReservePlace int `json:"leftReservePlace"` //鍋滆溅搴撻绾﹁溅浣嶅墿浣欐暟
+ TotalPlace int `json:"totalPlace"` //鍋滆溅搴撹溅浣嶆�绘暟
+ TotalPermPlace int `json:"totalPermPlace"` //鍋滆溅搴撳浐瀹氳溅浣嶆�绘暟
+ TotalReservePlace int `json:"totalReservePlace"` //鍋滆溅浣嶉绾﹁溅浣嶆�绘暟
+ LeftPlace int `json:"leftPlace"` //鍋滆溅搴撹溅浣嶅墿浣欐暟
+ LeftPermPlace int `json:"leftPermPlace"` //鍋滆溅搴撳浐瀹氳溅浣嶅墿浣欐暟
+ LeftReservePlace int `json:"leftReservePlace"` //鍋滆溅搴撻绾﹁溅浣嶅墿浣欐暟
}
func (sv *CarService) getRemainSpaceNum(parkIndexCode string) []RemainSpaceResult {
--
Gitblit v1.8.0