|
@@ -3,6 +3,7 @@ package chart
|
|
|
import (
|
|
|
"context"
|
|
|
"encoding/json"
|
|
|
+ "fmt"
|
|
|
"github.com/gin-gonic/gin"
|
|
|
"hongze/hongze_yb/controller/response"
|
|
|
"hongze/hongze_yb/global"
|
|
@@ -13,6 +14,7 @@ import (
|
|
|
chartInfoModel "hongze/hongze_yb/models/tables/chart_info"
|
|
|
"hongze/hongze_yb/models/tables/chart_info_log"
|
|
|
"hongze/hongze_yb/models/tables/yb_my_chart"
|
|
|
+ "hongze/hongze_yb/services/alarm_msg"
|
|
|
"hongze/hongze_yb/services/chart"
|
|
|
future_goodServ "hongze/hongze_yb/services/chart/future_good"
|
|
|
"hongze/hongze_yb/services/user"
|
|
@@ -271,15 +273,15 @@ func RefreshFutureGoodChartInfo(c *gin.Context) {
|
|
|
}
|
|
|
|
|
|
// 刷新图表
|
|
|
- //if err = chart.ChartInfoRefreshV2(chartInfo.ChartInfoId); err != nil {
|
|
|
- // errContent := fmt.Sprint("ErrMsg: 刷新图表关联指标信息失败, " + err.Error())
|
|
|
- // if global.CONFIG.Serve.RunMode == "release" {
|
|
|
- // go alarm_msg.SendAlarmMsg("刷新图表报错"+time.Now().Format("2006-01-02 15:04:05")+";Err:"+errContent, 3)
|
|
|
- // //go services.SendEmail("弘则研报小程序-release-刷新图表报错", errContent, utils.EmailSendToUsers)
|
|
|
- // } else {
|
|
|
- // global.LOG.Info(errContent)
|
|
|
- // }
|
|
|
- //}
|
|
|
+ if err = future_goodServ.FutureGoodChartInfoRefresh(chartInfo.ChartInfoId); err != nil {
|
|
|
+ errContent := fmt.Sprint("ErrMsg: 刷新图表关联指标信息失败, " + err.Error())
|
|
|
+ if global.CONFIG.Serve.RunMode == "release" {
|
|
|
+ go alarm_msg.SendAlarmMsg("刷新图表报错"+time.Now().Format("2006-01-02 15:04:05")+";Err:"+errContent, 3)
|
|
|
+ //go services.SendEmail("弘则研报小程序-release-刷新图表报错", errContent, utils.EmailSendToUsers)
|
|
|
+ } else {
|
|
|
+ global.LOG.Info(errContent)
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
//清除图表缓存
|
|
|
{
|