|
@@ -92,6 +92,7 @@ func (this *MySteelChemicalController) Refresh() {
|
|
|
br.ErrMsg = "请输入指标ID"
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
cacheKey = utils.CACHE_EDB_DATA_REFRESH + strconv.Itoa(source) + "_" + req.EdbCode
|
|
|
if utils.Rc.IsExist(cacheKey) {
|
|
|
br.Ret = 501
|
|
@@ -131,10 +132,14 @@ func (this *MySteelChemicalController) Refresh() {
|
|
|
return
|
|
|
}
|
|
|
// 添加指标刷新成功日志
|
|
|
+ isSourceRefresh := 0
|
|
|
+ if utils.MysteelChemicalApiToken != "" {
|
|
|
+ isSourceRefresh = 1
|
|
|
+ }
|
|
|
if erDataUpdateDate != "" {
|
|
|
- _ = services.AddEdbInfoUpdateLog(edbInfo.EdbInfoId, 1, "", 1, "", 0, 0)
|
|
|
+ _ = services.AddEdbInfoUpdateLog(edbInfo.EdbInfoId, 1, "", 1, "", isSourceRefresh, 0)
|
|
|
} else {
|
|
|
- _ = services.AddEdbInfoUpdateLog(edbInfo.EdbInfoId, 1, "", 2, "未刷新到数据", 0, 0)
|
|
|
+ _ = services.AddEdbInfoUpdateLog(edbInfo.EdbInfoId, 1, "", 2, "未刷新到数据", isSourceRefresh, 0)
|
|
|
}
|
|
|
|
|
|
// 更新ES
|
|
@@ -146,7 +151,6 @@ func (this *MySteelChemicalController) Refresh() {
|
|
|
_ = services.SetMysteelChemicalEdbInfoUpdateStat(false)
|
|
|
_ = services.SetEdbSourceStat(false)
|
|
|
}
|
|
|
-
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
br.Msg = "获取成功"
|