|
@@ -2,11 +2,11 @@ package index_data
|
|
|
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
- "eta/eta_bridge/controller/resp"
|
|
|
- "eta/eta_bridge/global"
|
|
|
- indexDataReq "eta/eta_bridge/models/request/index_data"
|
|
|
- "eta/eta_bridge/models/response"
|
|
|
- indexDataService "eta/eta_bridge/services/index_data"
|
|
|
+ "eta_gn/eta_bridge/controller/resp"
|
|
|
+ "eta_gn/eta_bridge/global"
|
|
|
+ indexDataReq "eta_gn/eta_bridge/models/request/index_data"
|
|
|
+ "eta_gn/eta_bridge/models/response"
|
|
|
+ indexDataService "eta_gn/eta_bridge/services/index_data"
|
|
|
"fmt"
|
|
|
"github.com/gin-gonic/gin"
|
|
|
"github.com/go-playground/validator/v10"
|
|
@@ -39,13 +39,13 @@ func (j *ZhongjiIndexController) GetIndexList(c *gin.Context) {
|
|
|
}
|
|
|
|
|
|
token, err := indexDataService.GetSmmAccessToken(false)
|
|
|
- if err!= nil {
|
|
|
+ if err != nil {
|
|
|
resp.FailData("获取token失败", err.Error(), c)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
body, err := indexDataService.GetEdbDataListFromSmmHttp(req.Page, req.PageSize, token)
|
|
|
- if err!= nil {
|
|
|
+ if err != nil {
|
|
|
resp.FailData("获取token失败", err.Error(), c)
|
|
|
return
|
|
|
}
|
|
@@ -80,13 +80,13 @@ func (j *ZhongjiIndexController) GetIndexData(c *gin.Context) {
|
|
|
}
|
|
|
|
|
|
token, err := indexDataService.GetSmmAccessToken(false)
|
|
|
- if err!= nil {
|
|
|
+ if err != nil {
|
|
|
resp.FailData("获取token失败", err.Error(), c)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
body, err := indexDataService.GetEdbDataFromSmmHttp(req.EdbCode, token)
|
|
|
- if err!= nil {
|
|
|
+ if err != nil {
|
|
|
resp.FailData("获取token失败", err.Error(), c)
|
|
|
return
|
|
|
}
|
|
@@ -124,13 +124,13 @@ func (j *ZhongjiIndexController) GetIndexDataLatest(c *gin.Context) {
|
|
|
}
|
|
|
|
|
|
token, err := indexDataService.GetSmmAccessToken(false)
|
|
|
- if err!= nil {
|
|
|
+ if err != nil {
|
|
|
resp.FailData("获取token失败", err.Error(), c)
|
|
|
return
|
|
|
}
|
|
|
|
|
|
body, err := indexDataService.GetEdbLatestDataFromSmmHttp(req.EdbCode, token, req.LastTime)
|
|
|
- if err!= nil {
|
|
|
+ if err != nil {
|
|
|
resp.FailData("获取token失败", err.Error(), c)
|
|
|
return
|
|
|
}
|