renjiaojiao 1 سال پیش
والد
کامیت
d953858f31
2فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 2 2
      rpc/internal/common/sendMsg.go
  2. 1 1
      rpc/internal/common/sendWxTmplMsg.go

+ 2 - 2
rpc/internal/common/sendMsg.go

@@ -446,7 +446,7 @@ func MultSave(this message.MultipleSaveMsgReq) (int64, string) {
 				}
 			} else {*/
 			in = entity.Mysql.InsertBySql(sql3, common.If(positionId != 0, positionId, nil))
-			logx.Info("插入消息返回 in1 id:", in)
+			logx.Info("插入消息返回 in1 id:", in, this.MsgType, v)
 			if in > -1 {
 				ok := MsgCountAdd(v, this.Appid, util.Int64All(group_id))
 				if !ok {
@@ -470,7 +470,7 @@ func MultSave(this message.MultipleSaveMsgReq) (int64, string) {
 					nTime = this.OrderMoney
 				}
 				// 消息模版 工单类型 {{thing19.DATA}} 工单标题 {{thing6.DATA}} 项目名称 {{thing13.DATA}} 服务时间 {{time25.DATA}} 服务地址 {{thing26.DATA}}
-				if !(this.MsgType == 1) && this.MsgType != 10 {
+				if this.MsgType != 1 && this.MsgType != 10 {
 					err = p.SendMsg(this.WxPushUrl, this.Title, this.Content, nTime, this.Row4)
 					if err != nil {
 						logx.Error(fmt.Sprintf("SendWxTmplMsg uId %s  Error %s", v, err.Error()))

+ 1 - 1
rpc/internal/common/sendWxTmplMsg.go

@@ -83,7 +83,7 @@ func GetWxTmplConfig(msgType int64) (*WxTmplConfig, error) {
 }
 
 func (stm *WxTmplPush) SendMsg(link, title, detail, date, row4 string) error {
-	if stm.Config.TmplId == "" || (stm.MgoId != "" && stm.OpenId != "" && stm.Position != "") || link == "" {
+	if stm.Config == nil || stm.Config.TmplId == "" || (stm.MgoId != "" && stm.OpenId != "" && stm.Position != "") || link == "" {
 		return fmt.Errorf("缺少参数 stm.Config.TmplId:%v stm.MgoId:%v  stm.OpenId:%v stm.Position:%v link:%v ", stm.Config.TmplId, stm.MgoId, stm.OpenId, stm.Position, link)
 	}
 	// 校验推送是否开启