|
@@ -3,7 +3,6 @@ package controllers
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
"eta/eta_forum_hub/models"
|
|
|
- "eta/eta_forum_hub/models/system"
|
|
|
"eta/eta_forum_hub/services"
|
|
|
"eta/eta_forum_hub/utils"
|
|
|
"fmt"
|
|
@@ -347,23 +346,13 @@ func (this *ChartInfoController) CommonChartInfoDetailFromUniqueCode() {
|
|
|
isCache, _ := this.GetBool("IsCache")
|
|
|
key := utils.CACHE_CHART_INFO_DATA + uniqueCode
|
|
|
resp := new(models.ChartInfoDetailResp)
|
|
|
-
|
|
|
- // 图表水印
|
|
|
- conf, e := system.GetCrmConfigDetailByCode(system.CrmConfigCompanyWatermark)
|
|
|
- if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
- br.Msg = "获取失败"
|
|
|
- br.ErrMsg = "获取配置信息失败, Err: " + e.Error()
|
|
|
- return
|
|
|
- }
|
|
|
+
|
|
|
//判断是否有缓存
|
|
|
if utils.Re == nil && isCache {
|
|
|
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 != nil && conf.ConfigValue != "" {
|
|
|
- resp.WaterMark = conf.ConfigValue
|
|
|
- }
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
br.Msg = "获取成功"
|
|
@@ -404,9 +393,6 @@ func (this *ChartInfoController) CommonChartInfoDetailFromUniqueCode() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if conf != nil && conf.ConfigValue != "" {
|
|
|
- resp.WaterMark = conf.ConfigValue
|
|
|
- }
|
|
|
if resp != nil && resp.ChartInfo != nil && resp.ChartInfo.ChartInfoId != 0 {
|
|
|
resp.ChartInfo.HaveOperaAuth = true
|
|
|
}
|