Prechádzať zdrojové kódy

Merge branch 'dev/v4.8.49_dx' of qmx/jy into feature/v4.8.49

duxin 2 rokov pred
rodič
commit
20cdb80979

+ 5 - 4
src/jfw/modules/subscribepay/src/service/salesCreateOrder.go

@@ -1,6 +1,8 @@
 package service
 
 import (
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	"app.yhyue.com/moapp/jypkg/identity"
 	"encoding/base64"
 	"encoding/json"
 	"errors"
@@ -19,8 +21,6 @@ import (
 	. "app.yhyue.com/moapp/jybase/date"
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 	"app.yhyue.com/moapp/jybase/redis"
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-	"app.yhyue.com/moapp/jypkg/identity"
 	"github.com/SKatiyar/qr"
 	"go.mongodb.org/mongo-driver/bson"
 	"go.mongodb.org/mongo-driver/bson/primitive"
@@ -209,8 +209,8 @@ func (this *SalesCreateOrder) CreateBySeller() {
 		appUrl := fmt.Sprintf(config.Config.WebSiteParameter.AndroidUrl, inserMap.OrderCode)
 		wxUrl := fmt.Sprintf(config.Config.WebSiteParameter.WeChatUrl, inserMap.OrderCode)
 		go util.SendStationMessages(config.Config.WebSiteParameter.Addr, userid, config.Config.WebSiteParameter.Action,
-			"2", config.Config.WebSiteParameter.Title, config.Config.WebSiteParameter.Content,
-			pcUrl, appUrl, appUrl, wxUrl, qutil.InterfaceToStr(orderid))
+			"10", config.Config.WebSiteParameter.Title, config.Config.WebSiteParameter.Content,
+			pcUrl, appUrl, appUrl, wxUrl, inserMap)
 
 		if i_discountId > 0 {
 			go util.FindUserLotteryId(userid, orderid, i_discountId)
@@ -425,6 +425,7 @@ func (this *SalesCreateOrder) GetSubBuyMsg() {
 		if rData == nil || len(*rData) == 0 {
 			return &entity.FuncResult{false, errors.New("获取信息失败"), nil}
 		}
+		log.Println("11111111", *rData)
 		var isread = false
 		if (*rData)["isread"] != nil {
 			isread = (*rData)["isread"].(bool)

+ 8 - 3
src/jfw/modules/subscribepay/src/util/sellerOrder.go

@@ -4,6 +4,7 @@ import (
 	"encoding/json"
 	"fmt"
 	"io/ioutil"
+	"jy/src/jfw/modules/subscribepay/src/entity"
 	"net/http"
 	"net/url"
 	"time"
@@ -96,14 +97,18 @@ iosUrl		IOS消息链接
 weChatUrl	微信消息链接
 _token	是
 */
-func SendStationMessages(href, userId, action, msgType, title, content, link, androidUrl, iosUrl, weChatUrl, orderId string) {
+func SendStationMessages(href, userId, action, msgType, title, content, link, androidUrl, iosUrl, weChatUrl string, orderInfo *entity.OrderInfo) {
 	//websiteInformation := -1
 	var (
 		ret  MessageRet
 		cont []byte
 	)
-	pushHref := fmt.Sprintf("%s?_action=%s&userIds=%s&msgType=%s&title=%s&content=%s&link=%s&sendMode=2&sendTime=%s&androidUrl=%s&iosUrl=%s&weChatUrl=%s&_token=12311&reqSource=1&callPlatform=dyhxd",
-		href, action, userId, msgType, title, content, link, NowFormat(Date_Short_Layout), androidUrl, iosUrl, weChatUrl)
+	name := "超级订阅"
+	if orderInfo.VipType == 1 {
+		name = "超级订阅(续费)"
+	}
+	pushHref := fmt.Sprintf("%s?_action=%s&userIds=%s&msgType=%s&title=%s&content=%s&link=%s&sendMode=2&sendTime=%s&androidUrl=%s&iosUrl=%s&weChatUrl=%s&_token=12311&reqSource=1&callPlatform=dyhxd&name=%s&orderid=%s&ordermoney=%d&details=您的订单%s处于未支付状态,为了使您获取更多...",
+		href, action, userId, msgType, title, content, link, NowFormat(Date_Short_Layout), androidUrl, iosUrl, weChatUrl, name, orderInfo.OrderCode, orderInfo.OrderMoney, orderInfo.OrderCode)
 	log.Info("href:", pushHref)
 	log.Println(pushHref)
 	resp, err := http.Get(pushHref)