Pārlūkot izejas kodu

fix:推送修改

duxin 1 gadu atpakaļ
vecāks
revīzija
2217431598

+ 12 - 0
rpc/internal/common/appPush.go

@@ -66,6 +66,18 @@ func AppGrpcPush(pushData map[string]interface{}, otherPushId, jgPushId, phoneTy
 		return err
 	}
 	defer client.Close()
+	//	"title":          "您有新的招标信息!",                                     //标题
+	//		"descript":       "1. 云浮市人民医院云浮市人民医院新生儿科医用设备及配套医用器具、辅助设施采购项目采购计划", //副标题
+	//		"descriptAppend": "\n...(共251条)",
+	//		"otherPushId":    s_opushid,                //mongodb库user表中s_opushid
+	//		"jgPushId":       s_jpushid,                //mongodb库user表中s_jpushid
+	//		"userId":         BsonIdToSId((*u)["_id"]), //mongodb库user表中_id转string
+	//		"phoneType":      "iPhone",                 //mongodb库user表中s_appponetype
+	//		"type":           "bid",                    //消息类型,消息中心推送的消息使用messagecenter
+	//		"url":            "/jyapp/free/sess/" + encrypt.SE.EncodeString("111"+",_id,"+strconv.Itoa(int(time.Now().Unix()))+",historypush") + "__free__" + fmt.Sprint(time.Now().Unix()),
+	//		"menuName":       "subscribe", //在哪个webview打开链接,search:搜索 subscribe:订阅 box:百宝箱 me:我的 other:新的webview message:消息
+	//		"redDot":         "subscribe", //在哪个底部菜单显示小红点,空值则不显示小红点,search:搜索 subscribe:订阅 box:百宝箱 me:我的 message:消息
+	//
 	push := map[string]interface{}{
 		"title":       pushData["title"],         //标题
 		"descript":    pushData["content"],       //副标题

+ 1 - 1
rpc/internal/logic/appletterpushlogic.go

@@ -54,7 +54,7 @@ func (l *AppLetterPushLogic) AppLetterPush(in *message.WxTmplMsgRequest) (*messa
 		}
 		if len(query) > 0 {
 			userData := make(map[string]interface{})
-			rData, _ := entity.MQFW.FindOneByField("user", query, fmt.Sprintf(`{"_id":1,"s_appversion":1,"s_nmae":1,"s_nmae":1,"s_jpushid":1,"s_opushid":1,"s_m_openid":1,"o_pushset.%s.i_apppush":1}`, pushConfig.Switch))
+			rData, _ := entity.MQFW.FindOneByField("user", query, fmt.Sprintf(`{"_id":1,"s_appponetype":1,"s_appversion":1,"s_nmae":1,"s_nmae":1,"s_jpushid":1,"s_opushid":1,"s_m_openid":1,"o_pushset.%s.i_apppush":1}`, pushConfig.Switch))
 			if rData != nil && len(*rData) > 0 {
 				userData = *rData
 			}