|
@@ -43,12 +43,24 @@ func (this *ChartController) CommonChartInfoDetailFromUniqueCode() {
|
|
|
}
|
|
|
key := utils.HZ_CHART_LIB_DETAIL + uniqueCode
|
|
|
resp := new(models.ChartInfoDetailResp)
|
|
|
+
|
|
|
+ // 图表水印
|
|
|
+ conf, e := models.GetBusinessConf()
|
|
|
+ if e != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取配置信息失败, Err: " + e.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
//判断是否有缓存
|
|
|
if utils.Re == nil {
|
|
|
if utils.Re == nil && utils.Rc.IsExist(key) {
|
|
|
if data, err1 := utils.Rc.RedisBytes(key); err1 == nil {
|
|
|
err := json.Unmarshal(data, &resp)
|
|
|
if err == nil && resp != nil {
|
|
|
+ if conf[models.BusinessConfWatermarkChart] == "true" && conf[models.BusinessConfCompanyWatermark] != "" {
|
|
|
+ resp.WaterMark = conf[models.BusinessConfCompanyWatermark]
|
|
|
+ }
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
br.Msg = "获取成功"
|
|
@@ -99,13 +111,6 @@ func (this *ChartController) CommonChartInfoDetailFromUniqueCode() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- // 图表水印
|
|
|
- conf, e := models.GetBusinessConf()
|
|
|
- if e != nil {
|
|
|
- br.Msg = "获取失败"
|
|
|
- br.ErrMsg = "获取配置信息失败, Err: " + e.Error()
|
|
|
- return
|
|
|
- }
|
|
|
if conf[models.BusinessConfWatermarkChart] == "true" && conf[models.BusinessConfCompanyWatermark] != "" {
|
|
|
resp.WaterMark = conf[models.BusinessConfCompanyWatermark]
|
|
|
}
|