Browse Source

Merge branch 'needs/report_share_20230601' into debug

hsun 1 year ago
parent
commit
bfc6ee65b2

+ 94 - 5
controllers/english_report.go

@@ -13,7 +13,7 @@ import (
 	"time"
 )
 
-//报告分享
+// EnglishReportShareController 报告分享
 type EnglishReportShareController struct {
 	BaseCommonController
 }
@@ -22,6 +22,7 @@ type EnglishReportController struct {
 	BaseCommonController
 }
 
+// EnglishReportDetail
 // @Title 英文研报-分享详情
 // @Description 英文研报-分享详情
 // @Param   ReportCode   query   string  true	"报告唯一编码"
@@ -194,8 +195,8 @@ func (this *EnglishReportController) ListReport() {
 
 	pageSize, _ := this.GetInt("PageSize")
 	currentIndex, _ := this.GetInt("CurrentIndex")
-	classifyIdFirst,_ := this.GetInt("ClassifyIdFirst")
-	classifyIdSecond,_ := this.GetInt("ClassifyIdSecond")
+	classifyIdFirst, _ := this.GetInt("ClassifyIdFirst")
+	classifyIdSecond, _ := this.GetInt("ClassifyIdSecond")
 
 	var startSize int
 	if pageSize <= 0 {
@@ -268,7 +269,6 @@ func (this *EnglishReportController) ListReport() {
 	br.Data = resp
 }
 
-
 // FilterByEs
 // @Title 英文报告筛选接口
 // @Description 英文报告筛选接口
@@ -354,7 +354,7 @@ func (this *EnglishReportController) FilterByEs() {
 	}
 	page := paging.GetPaging(currentIndex, pageSize, int(total))
 	//新增搜索词记录
-   /*{
+	/*{
 		searchKeyword := new(data_manage.SearchKeyword)
 		searchKeyword.KeyWord = keyWord
 		searchKeyword.CreateTime = time.Now()
@@ -372,3 +372,92 @@ func (this *EnglishReportController) FilterByEs() {
 	br.Data = resp
 }
 
+// TrialEnglishReportDetail
+// @Title 英文研报-分享详情-ETA试用平台
+// @Description 英文研报-分享详情
+// @Param   ReportCode   query   string  true	"报告唯一编码"
+// @Param   ShareEmail   query   int  false	"推送的邮箱ID"
+// @Success 200 {object} models.ReportShareDetailResp
+// @router /trial/share/detail [get]
+func (this *EnglishReportShareController) TrialEnglishReportDetail() {
+	br := new(models.BaseResponse).Init()
+	defer func() {
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+	reportCode := this.GetString("ReportCode")
+	if reportCode == "" {
+		br.Msg = "参数错误"
+		br.ErrMsg = "参数错误,reportCode 为空"
+		return
+	}
+	report, err := models.GetTrialEnglishReportByCode(reportCode)
+	if err != nil {
+		br.Msg = "该报告已删除"
+		br.ErrMsg = "获取报告详情失败,Err:" + err.Error()
+		return
+	}
+	err = models.UpdateTrialEnglishReportCounts(reportCode)
+	if err != nil {
+		br.Msg = "更新失败"
+		br.ErrMsg = "更新失败,Err:" + err.Error()
+		return
+	}
+	report.ContentSub = html.UnescapeString(report.ContentSub)
+	report.Content = html.UnescapeString(report.Content)
+
+	// 记录邮箱
+	shareEmail, _ := this.GetInt("ShareEmail", 0)
+	if shareEmail != 0 {
+		go func() {
+			var errMsg error
+			defer func() {
+				if errMsg != nil {
+					alarm_msg.SendAlarmMsg(utils.APPNAME+"更新英文报告邮箱PV失败, Err: "+errMsg.Error(), 2)
+				}
+			}()
+
+			userEmail, e := models.GetTrialEnglishReportEmailById(shareEmail)
+			if e != nil && e.Error() != utils.ErrNoRow() {
+				errMsg = errors.New("获取客户邮箱信息失败, Err:" + e.Error())
+				return
+			}
+			if userEmail == nil {
+				return
+			}
+			// 更新报告邮箱pv(冗余)
+			if e = models.UpdateTrialEnglishReportEmailCounts(reportCode); e != nil {
+				errMsg = errors.New("更新报告邮箱PV失败, Err:" + e.Error())
+				return
+			}
+			// 记录邮箱PV
+			pv := &models.EnglishReportEmailPV{
+				ReportId:   report.Id,
+				EmailId:    userEmail.Id,
+				CreateTime: time.Now().Local(),
+			}
+			if e = models.InsertTrialEnglishReportEmailPV(pv); e != nil {
+				errMsg = errors.New("新增邮箱PV失败, Err: " + e.Error())
+				return
+			}
+			// 更新阅读量
+			if e = models.UpdateTrialEnglishReportEmailViewTotal(userEmail.Id); e != nil {
+				errMsg = errors.New("更新英文联系人阅读量失败, Err: " + e.Error())
+				return
+			}
+			if userEmail.CompanyId > 0 {
+				if e = models.UpdateTrialEnglishCompanyViewTotal(userEmail.CompanyId); e != nil {
+					errMsg = errors.New("更新英文客户阅读量, Err: " + e.Error())
+					return
+				}
+			}
+		}()
+	}
+
+	resp := new(models.EnglishReportShareDetailResp)
+	resp.Report = report
+	br.Ret = 200
+	br.Success = true
+	br.Msg = "获取成功"
+	br.Data = resp
+}

+ 39 - 1
controllers/report_share.go

@@ -5,11 +5,12 @@ import (
 	"html"
 )
 
-//报告分享
+// ReportShareController 报告分享
 type ReportShareController struct {
 	BaseCommonController
 }
 
+// Detail
 // @Title 日评详情
 // @Description 日评详情接口
 // @Param   ReportCode   query   string  true       "报告唯一编码"
@@ -44,3 +45,40 @@ func (this *ReportShareController) Detail() {
 	br.Msg = "获取成功"
 	br.Data = resp
 }
+
+// TrialDetail
+// @Title 日评详情-ETA试用平台
+// @Description 日评详情接口
+// @Param   ReportCode   query   string  true       "报告唯一编码"
+// @Success 200 {object} models.ReportShareDetailResp
+// @router /trial/share/detail [get]
+func (this *ReportShareController) TrialDetail() {
+	br := new(models.BaseResponse).Init()
+	defer func() {
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+
+	reportCode := this.GetString("ReportCode")
+	if reportCode == "" {
+		br.Msg = "参数错误"
+		br.ErrMsg = "参数错误,reportCode 为空"
+		return
+	}
+	report, err := models.GetTrialReportByCode(reportCode)
+	if err != nil {
+		br.Msg = "该报告已删除"
+		br.ErrMsg = "获取报告详情失败,Err:" + err.Error()
+		return
+	}
+	report.ContentSub = html.UnescapeString(report.ContentSub)
+	report.Content = html.UnescapeString(report.Content)
+
+	resp := new(models.ReportShareDetailResp)
+	resp.Report = report
+
+	br.Ret = 200
+	br.Success = true
+	br.Msg = "获取成功"
+	br.Data = resp
+}

+ 52 - 6
controllers/wechat.go

@@ -427,11 +427,11 @@ func (this *WechatCommonController) Notify() {
 			var flag bool
 			for _, v := range classifyArr {
 				if strings.Contains(v, item.Content) || strings.Contains(item.Content, v) {
-					flag=true
+					flag = true
 				}
 			}
 			if flag {
-				contactMsg=`请点击研究报告-FICC研报,查看报告`
+				contactMsg = `请点击研究报告-FICC研报,查看报告`
 				textXmlTpl = fmt.Sprintf(textXmlTpl, item.FromUserName, utils.WxId, createTime, contactMsg)
 				this.Ctx.WriteString(textXmlTpl)
 				return
@@ -439,11 +439,11 @@ func (this *WechatCommonController) Notify() {
 			reportNameArr := utils.ReportNameArr
 			for _, v := range reportNameArr {
 				if strings.Contains(v, item.Content) || strings.Contains(item.Content, v) {
-					flag=true
+					flag = true
 				}
 			}
 			if flag {
-				contactMsg=`请点击研究报告-FICC研报-研报(左上),查看报告`
+				contactMsg = `请点击研究报告-FICC研报-研报(左上),查看报告`
 				textXmlTpl = fmt.Sprintf(textXmlTpl, item.FromUserName, utils.WxId, createTime, contactMsg)
 				this.Ctx.WriteString(textXmlTpl)
 				return
@@ -451,11 +451,11 @@ func (this *WechatCommonController) Notify() {
 
 			if strings.Contains("解绑", item.Content) || strings.Contains(item.Content, "解绑") ||
 				strings.Contains("手机号", item.Content) || strings.Contains(item.Content, "手机号") {
-				flag=true
+				flag = true
 			}
 
 			if flag {
-				contactMsg=`请通过电话联系我们或者联系销售人员处理`
+				contactMsg = `请通过电话联系我们或者联系销售人员处理`
 				textXmlTpl = fmt.Sprintf(textXmlTpl, item.FromUserName, utils.WxId, createTime, contactMsg)
 				this.Ctx.WriteString(textXmlTpl)
 				return
@@ -580,3 +580,49 @@ func subscribe(openId string) {
 		return
 	}
 }
+
+// @Title 微信获取签名接口-无token校验
+// @Description 微信获取签名接口
+// @Param   Url   query   string  true       "url地址"
+// @Success 200 {object} models.WechatSign
+// @router /open/getWxSign [get]
+func (this *WechatCommonController) GetWxSign() {
+	br := new(models.BaseResponse).Init()
+	defer func() {
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+	getUrl := this.GetString("Url")
+	fmt.Println("getUrl:", getUrl)
+	accessToken, err := services.WxGetAccessToken()
+	if err != nil {
+		br.Msg = "获取用户信息失败"
+		br.ErrMsg = "获取access_token失败,err:" + err.Error()
+		return
+	}
+
+	ticket, err := services.GetWxTicket(accessToken)
+	if err != nil {
+		br.Msg = "获取Ticket失败,请联系客服"
+		br.ErrMsg = "获取Ticket失败,Err" + err.Error()
+		return
+	}
+	if ticket == "" {
+		br.Msg = "获取Ticket失败,请联系客服"
+		br.ErrMsg = "ticket为空" + ticket
+		return
+	}
+	nonceStr := utils.GetRandStringNoSpecialChar(16)
+	signature, nonceString, timestamp := services.GetWxSignature(ticket, getUrl, nonceStr)
+
+	resp := new(models.WechatSign)
+	resp.AppId = utils.WxAppId
+	resp.NonceStr = nonceString
+	resp.Timestamp = timestamp
+	resp.Url = getUrl
+	resp.Signature = signature
+	br.Ret = 200
+	br.Success = true
+	br.Msg = "获取签名成功"
+	br.Data = resp
+}

+ 12 - 5
models/db.go

@@ -24,12 +24,19 @@ func init() {
 	report_db, _ := orm.GetDB("rddp")
 	report_db.SetConnMaxLifetime(10 * time.Minute)
 
-	_ = orm.RegisterDataBase("edb", "mysql", utils.MYSQL_URL_EDB)
-	orm.SetMaxIdleConns("edb", 50)
-	orm.SetMaxOpenConns("edb", 100)
+	//_ = orm.RegisterDataBase("edb", "mysql", utils.MYSQL_URL_EDB)
+	//orm.SetMaxIdleConns("edb", 50)
+	//orm.SetMaxOpenConns("edb", 100)
 
-	edb_db, _ := orm.GetDB("edb")
-	edb_db.SetConnMaxLifetime(10 * time.Minute)
+	//edb_db, _ := orm.GetDB("edb")
+	//edb_db.SetConnMaxLifetime(10 * time.Minute)
+
+	_ = orm.RegisterDataBase("rddp_trial", "mysql", utils.MYSQL_URL_RDDP_TRIAL)
+	orm.SetMaxIdleConns("rddp_trial", 50)
+	orm.SetMaxOpenConns("rddp_trial", 100)
+
+	rddpTrial, _ := orm.GetDB("rddp_trial")
+	rddpTrial.SetConnMaxLifetime(10 * time.Minute)
 
 	orm.Debug = true
 	orm.DebugLog = orm.NewLog(utils.Binlog)

+ 8 - 0
models/english_company.go

@@ -71,3 +71,11 @@ func UpdateEnglishCompanyViewTotal(companyId int) (err error) {
 	_, err = o.Raw(sql, companyId).Exec()
 	return
 }
+
+// UpdateTrialEnglishCompanyViewTotal 更新英文客户阅读量-ETA试用平台
+func UpdateTrialEnglishCompanyViewTotal(companyId int) (err error) {
+	o := orm.NewOrmUsingDB("rddp_trial")
+	sql := `UPDATE english_company SET view_total = view_total+1 WHERE company_id = ? `
+	_, err = o.Raw(sql, companyId).Exec()
+	return
+}

+ 52 - 35
models/english_report.go

@@ -31,7 +31,7 @@ type EnglishReportDetail struct {
 	ThsMsgIsSend       int    `description:"客户群消息是否已发送,0:否,1:是"`
 	HasChapter         int    `description:"是否有章节 0-否 1-是"`
 	ChapterType        string `description:"章节类型 day-晨报 week-周报"`
-	ReportCode         string    `description:"报告唯一编码"`
+	ReportCode         string `description:"报告唯一编码"`
 	Overview           string `description:"英文概述部分"`
 }
 
@@ -112,23 +112,20 @@ func UpdateEnglishReportEmailCounts(reportCode string) (err error) {
 }
 
 type EnglishClassifyList struct {
-	Id            int       `description:"分类ID"`
-	ClassifyName  string    `description:"分类名称"`
-	Sort          int       `description:"排序"`
-	ParentId      int       `description:"父级分类id"`
-	CreateTime    string    `description:"创建时间"`
-	ModifyTime    string    `description:"修改时间"`
-	ClassifyLabel string    `description:"分类标签"`
-	ShowType      int       `description:"展示类型:1-列表 2-专栏"`
-	IsShow        int       `description:"是否在小程序显示:1-显示 0-隐藏"`
+	Id            int    `description:"分类ID"`
+	ClassifyName  string `description:"分类名称"`
+	Sort          int    `description:"排序"`
+	ParentId      int    `description:"父级分类id"`
+	CreateTime    string `description:"创建时间"`
+	ModifyTime    string `description:"修改时间"`
+	ClassifyLabel string `description:"分类标签"`
+	ShowType      int    `description:"展示类型:1-列表 2-专栏"`
+	IsShow        int    `description:"是否在小程序显示:1-显示 0-隐藏"`
 	Child         []*EnglishClassify
 }
 
-
-
-
 type EnglishClassifyListResp struct {
-	List   []*EnglishClassifyList
+	List []*EnglishClassifyList
 }
 
 // GetParentEnglishClassify 获取一级分类列表
@@ -147,7 +144,6 @@ func GetChildEnglishClassify() (items []*EnglishClassify, err error) {
 	return
 }
 
-
 func GetEnglishReportListCount(condition string, pars []interface{}) (count int, err error) {
 	//产品权限
 	oRddp := orm.NewOrmUsingDB("rddp")
@@ -160,25 +156,25 @@ func GetEnglishReportListCount(condition string, pars []interface{}) (count int,
 }
 
 type EnglishReportList struct {
-	Id                 int       `description:"报告Id"`
-	AddType            int       `description:"新增方式:1:新增报告,2:继承报告"`
-	ClassifyIdFirst    int       `description:"一级分类id"`
-	ClassifyNameFirst  string    `description:"一级分类名称"`
-	ClassifyIdSecond   int       `description:"二级分类id"`
-	ClassifyNameSecond string    `description:"二级分类名称"`
-	Title              string    `description:"标题"`
-	Abstract           string    `description:"摘要"`
-	Author             string    `description:"作者"`
-	Frequency          string    `description:"频度"`
-	CreateTime         string    `description:"创建时间"`
-	ModifyTime         string    `description:"修改时间"`
-	PublishTime        string    `description:"发布时间"`
-	Stage              int       `description:"期数"`
-	VideoUrl           string    `description:"音频文件URL"`
-	VideoName          string    `description:"音频文件名称"`
-	VideoPlaySeconds   string    `description:"音频播放时长"`
-	ReportCode         string    `description:"报告唯一编码"`
-	ShareUrl           string    `description:"分享url"`
+	Id                 int    `description:"报告Id"`
+	AddType            int    `description:"新增方式:1:新增报告,2:继承报告"`
+	ClassifyIdFirst    int    `description:"一级分类id"`
+	ClassifyNameFirst  string `description:"一级分类名称"`
+	ClassifyIdSecond   int    `description:"二级分类id"`
+	ClassifyNameSecond string `description:"二级分类名称"`
+	Title              string `description:"标题"`
+	Abstract           string `description:"摘要"`
+	Author             string `description:"作者"`
+	Frequency          string `description:"频度"`
+	CreateTime         string `description:"创建时间"`
+	ModifyTime         string `description:"修改时间"`
+	PublishTime        string `description:"发布时间"`
+	Stage              int    `description:"期数"`
+	VideoUrl           string `description:"音频文件URL"`
+	VideoName          string `description:"音频文件名称"`
+	VideoPlaySeconds   string `description:"音频播放时长"`
+	ReportCode         string `description:"报告唯一编码"`
+	ShareUrl           string `description:"分享url"`
 }
 
 type EnglishReportListResp struct {
@@ -196,4 +192,25 @@ func GetEnglishReportList(condition string, pars []interface{}, startSize, pageS
 	sql += `ORDER BY  publish_time DESC, id DESC LIMIT ?,?`
 	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
 	return
-}
+}
+
+func GetTrialEnglishReportByCode(reportCode string) (item *EnglishReportDetail, err error) {
+	o := orm.NewOrmUsingDB("rddp_trial")
+	sql := `SELECT * FROM english_report WHERE report_code=?`
+	err = o.Raw(sql, reportCode).QueryRow(&item)
+	return
+}
+
+func UpdateTrialEnglishReportCounts(reportCode string) (err error) {
+	o := orm.NewOrmUsingDB("rddp_trial")
+	sql := `UPDATE english_report SET pv = pv+1 WHERE report_code = ?  `
+	_, err = o.Raw(sql, reportCode).Exec()
+	return
+}
+
+func UpdateTrialEnglishReportEmailCounts(reportCode string) (err error) {
+	o := orm.NewOrmUsingDB("rddp_trial")
+	sql := `UPDATE english_report SET pv_email = pv_email+1 WHERE report_code = ?  `
+	_, err = o.Raw(sql, reportCode).Exec()
+	return
+}

+ 16 - 0
models/english_report_email.go

@@ -62,3 +62,19 @@ func UpdateEnglishReportEmailViewTotal(emailId int) (err error) {
 	_, err = o.Raw(sql, emailId).Exec()
 	return
 }
+
+// GetTrialEnglishReportEmailById 主键获取邮箱-ETA试用平台
+func GetTrialEnglishReportEmailById(id int) (item *EnglishReportEmail, err error) {
+	o := orm.NewOrmUsingDB("rddp_trial")
+	sql := `SELECT * FROM english_report_email WHERE is_deleted = 0 AND id = ? LIMIT 1`
+	err = o.Raw(sql, id).QueryRow(&item)
+	return
+}
+
+// UpdateTrialEnglishReportEmailViewTotal 更新英文联系人阅读量-ETA试用平台
+func UpdateTrialEnglishReportEmailViewTotal(emailId int) (err error) {
+	o := orm.NewOrmUsingDB("rddp_trial")
+	sql := `UPDATE english_report_email SET view_total = view_total+1, last_view_time = NOW() WHERE id = ? `
+	_, err = o.Raw(sql, emailId).Exec()
+	return
+}

+ 8 - 0
models/english_report_email_pv.go

@@ -26,3 +26,11 @@ func (item *EnglishReportEmailPV) Create() (err error) {
 	item.Id = int(id)
 	return
 }
+
+// InsertTrialEnglishReportEmailPV ETA试用平台-新增英文邮箱PV
+func InsertTrialEnglishReportEmailPV(item *EnglishReportEmailPV) (err error) {
+	o := orm.NewOrmUsingDB("rddp_trial")
+	sql := `INSERT INTO english_report_email_pv VALUE(?, ?, ?)`
+	_, err = o.Raw(sql, item.ReportId, item.EmailId, item.CreateTime).Exec()
+	return
+}

+ 8 - 0
models/report.go

@@ -269,3 +269,11 @@ func GetReportAuthor(reportAuthor string) (item *ReportAuthor, err error) {
 	err = o.Raw(sql, reportAuthor).QueryRow(&item)
 	return
 }
+
+// GetTrialReportByCode ETA试用-根据编码获取报告
+func GetTrialReportByCode(reportCode string) (item *Report, err error) {
+	o := orm.NewOrmUsingDB("rddp_trial")
+	sql := `SELECT * FROM report WHERE report_code=?`
+	err = o.Raw(sql, reportCode).QueryRow(&item)
+	return
+}

+ 27 - 0
routers/commentsRouter.go

@@ -79,6 +79,15 @@ func init() {
             Filters: nil,
             Params: nil})
 
+    beego.GlobalControllerRouter["hongze/hongze_api/controllers:EnglishReportShareController"] = append(beego.GlobalControllerRouter["hongze/hongze_api/controllers:EnglishReportShareController"],
+        beego.ControllerComments{
+            Method: "TrialEnglishReportDetail",
+            Router: `/trial/share/detail`,
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
     beego.GlobalControllerRouter["hongze/hongze_api/controllers:HomeCommonController"] = append(beego.GlobalControllerRouter["hongze/hongze_api/controllers:HomeCommonController"],
         beego.ControllerComments{
             Method: "PcListBanner",
@@ -205,6 +214,15 @@ func init() {
             Filters: nil,
             Params: nil})
 
+    beego.GlobalControllerRouter["hongze/hongze_api/controllers:ReportShareController"] = append(beego.GlobalControllerRouter["hongze/hongze_api/controllers:ReportShareController"],
+        beego.ControllerComments{
+            Method: "TrialDetail",
+            Router: `/trial/share/detail`,
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
     beego.GlobalControllerRouter["hongze/hongze_api/controllers:RunLogController"] = append(beego.GlobalControllerRouter["hongze/hongze_api/controllers:RunLogController"],
         beego.ControllerComments{
             Method: "Edit",
@@ -376,6 +394,15 @@ func init() {
             Filters: nil,
             Params: nil})
 
+    beego.GlobalControllerRouter["hongze/hongze_api/controllers:WechatCommonController"] = append(beego.GlobalControllerRouter["hongze/hongze_api/controllers:WechatCommonController"],
+        beego.ControllerComments{
+            Method: "GetWxSign",
+            Router: `/open/getWxSign`,
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
     beego.GlobalControllerRouter["hongze/hongze_api/controllers:WechatCommonController"] = append(beego.GlobalControllerRouter["hongze/hongze_api/controllers:WechatCommonController"],
         beego.ControllerComments{
             Method: "PcWechatLogin",

+ 9 - 7
utils/config.go

@@ -15,7 +15,8 @@ var (
 	RunMode        string //运行模式
 	MYSQL_URL      string //数据库连接
 	MYSQL_URL_RDDP string //数据库连接
-	MYSQL_URL_EDB  string
+	//MYSQL_URL_EDB        string
+	MYSQL_URL_RDDP_TRIAL string // ETA试用rddp库
 
 	REDIS_CACHE string        //缓存地址
 	Redis       *redis.Client //redis链接
@@ -25,7 +26,7 @@ var (
 	STATIC_DIR string
 )
 
-//微信配置信息
+// 微信配置信息
 var (
 	WxId                             string //微信原始ID
 	WxAppId                          string
@@ -36,7 +37,7 @@ var (
 	EsEnglishReportIndexName         string //研报ES索引
 )
 
-//pc端微信配置信息
+// pc端微信配置信息
 var (
 	PcWxId                string //微信原始ID
 	PcWxAppId             string
@@ -47,8 +48,8 @@ var (
 )
 
 var (
-	ClassifyArr []string
-	ReportNameArr  []string
+	ClassifyArr   []string
+	ReportNameArr []string
 )
 
 func init() {
@@ -88,7 +89,8 @@ func init() {
 	logs.Info(RunMode + " 模式")
 	MYSQL_URL = config["mysql_url"]
 	MYSQL_URL_RDDP = config["mysql_url_rddp"]
-	MYSQL_URL_EDB = config["mysql_url_edb"]
+	//MYSQL_URL_EDB = config["mysql_url_edb"]
+	MYSQL_URL_RDDP_TRIAL = config["mysql_url_rddp_trial"]
 
 	if RunMode == "release" {
 		WxAppId = "wx4a844c734d8c8e56"
@@ -159,7 +161,7 @@ func initRedis(config map[string]string) {
 	Redis = client
 }
 
-//自动回复
+// 自动回复
 func initAutoReply() {
 	keyWord := `宏观经济、利率债、原油、PTA、MEG、织造终端、甲醇、聚烯烃、沥青、苯乙烯、聚酯、钢材、铁矿、玻璃纯碱、PVC、双焦、铜/铝、镍/不锈钢、锌、钴锂、策略`
 	ClassifyArr = strings.Split(keyWord, "、")