Browse Source

add:增加东吴桥接服务的地址

zqbao 8 months ago
parent
commit
2caf017e30
3 changed files with 13 additions and 13 deletions
  1. 6 10
      controllers/report.go
  2. 1 1
      services/third/dw_msg.go
  3. 6 2
      utils/config.go

+ 6 - 10
controllers/report.go

@@ -9,10 +9,6 @@ import (
 	"eta/eta_api/services/data"
 	"eta/eta_api/utils"
 	"fmt"
-	"github.com/beego/beego/v2/server/web"
-	"github.com/h2non/filetype"
-	"github.com/rdlucklib/rdluck_tools/paging"
-	"github.com/tealeg/xlsx"
 	"html"
 	"io/ioutil"
 	"os"
@@ -21,6 +17,11 @@ import (
 	"strconv"
 	"strings"
 	"time"
+
+	"github.com/beego/beego/v2/server/web"
+	"github.com/h2non/filetype"
+	"github.com/rdlucklib/rdluck_tools/paging"
+	"github.com/tealeg/xlsx"
 )
 
 // ReportController 报告
@@ -3294,12 +3295,7 @@ func (this *ReportController) SendMsg() {
 		br.ErrMsg = "参数解析失败,Err:" + err.Error()
 		return
 	}
-	if utils.BusinessCode != utils.BusinessCodeRelease && utils.BusinessCode != utils.BusinessCodeSandbox && utils.BusinessCode != utils.BusinessCodeDebug {
-		br.Ret = 200
-		br.Success = true
-		br.Msg = "操作成功"
-		return
-	}
+
 	if req.ReportId <= 0 {
 		br.Msg = "参数错误"
 		br.ErrMsg = "参数错误"

+ 1 - 1
services/third/dw_msg.go

@@ -41,7 +41,7 @@ func HttpGet(url string) (body []byte, err error) {
 }
 
 func DwSendTemplatedMsg(reportId int) error {
-	url := fmt.Sprintf("%s/v1/wechat/send_template_msg?ReportId=%d", utils.SendThirdTemplateMsgUrl, reportId)
+	url := fmt.Sprintf("%swechat/send_template_msg?ReportId=%d", utils.ETAMiniBridgeUrl, reportId)
 	body, err := HttpGet(url)
 	if err != nil {
 		return err

+ 6 - 2
utils/config.go

@@ -65,8 +65,6 @@ var (
 
 	// SendWxTemplateMsgUrl 模板消息推送
 	SendWxTemplateMsgUrl string
-	// SendDwTemplateMsgUrl 发送东吴模板消息推送
-	SendThirdTemplateMsgUrl string
 
 	// SendTemplateMsgAuthorization 模板推送秘钥
 	SendTemplateMsgAuthorization string
@@ -541,6 +539,12 @@ func init() {
 	}
 	// 商家编码
 	BusinessCode = config["business_code"]
+	// eta_mini_bridge 小程序桥接服务地址
+	{
+		ETAMiniBridgeUrl = config["eta_mini_bridge_url"]
+		ETA_MINI_APPID = config["eta_mini_api_appid"]       // 桥接服务-鉴权用
+		ETA_MINI_APP_SECRET = config["eta_mini_api_secret"] // 桥接服务-鉴权用
+	}
 
 	// MinIo相关
 	{