wcj 6 jaren geleden
bovenliggende
commit
ff07c46398
2 gewijzigde bestanden met toevoegingen van 7 en 8 verwijderingen
  1. 0 1
      core/src/qfw/coreutil/jyweixinrpc.go
  2. 7 7
      core/src/qfw/manage/feedback.go

+ 0 - 1
core/src/qfw/coreutil/jyweixinrpc.go

@@ -21,7 +21,6 @@ func init() {
 
 //剑鱼微信远程调用,实现模板发送消息
 func (jwr *jyWeixinRpc) SendFeedbackNotifyMsg(p *qrpc.NotifyMsg) {
-	return
 	util.Try(func() {
 		client, err := rpc.DialHTTP("tcp", JyWeixinRpc.address)
 		defer client.Close()

+ 7 - 7
core/src/qfw/manage/feedback.go

@@ -192,20 +192,20 @@ func (s *SystemManage) Updateback() error {
 				opinion := s.GetString("s_opinion")
 				if (*f)["i_appid"] == 2 {
 					userType := util.IntAll((*f)["i_type"])
+					jpushid, _ := (*f)["s_jpushid"].(string)
+					opushid, _ := (*f)["s_opushid"].(string)
 					//微信发送模板消息
-					msgurl := "/jyapp/free/sess/" + seTopnet.EncodeString(openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",myfeedbacks")
-					if userType == 0 {
+					if userType == 0 && openid != "" {
+						msgurl := coreconfig.SysConfig.JyWebdomain + "/front/sess/" + seTopnet.EncodeString(openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",myfeedbacks")
 						s_result := "剑鱼客服回复了您的问题!"
 						s_detail := "问题回复"
 						s_remark := "  " + opinion
 						s_submitdate := s.GetString("l_submitdate")
-						s_url := coreconfig.MessageConfig["jyFeedbackUrl"].(string)
 						log.Println("微信模板消息-意见反馈答复", openid)
-						go coreutil.JyWeixinRpc.SendFeedbackNotifyMsg(&qrpc.NotifyMsg{Openid: openid, Title: s_result, Detail: s_detail, Date: s_submitdate, Remark: s_remark, Url: s_url})
-					} else {
+						coreutil.JyWeixinRpc.SendFeedbackNotifyMsg(&qrpc.NotifyMsg{Openid: openid, Title: s_result, Detail: s_detail, Date: s_submitdate, Remark: s_remark, Url: msgurl})
+					} else if (userType == 1 || userType == 2) && (jpushid != "" || opushid != "") {
 						//app推送极光消息
-						jpushid, _ := (*f)["s_jpushid"].(string)
-						opushid, _ := (*f)["s_opushid"].(string)
+						msgurl := "/jyapp/free/sess/" + seTopnet.EncodeString(openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",myfeedbacks")
 						ponetype, _ := (*f)["s_appponetype"].(string)
 						if jpushid != "" || opushid != "" {
 							if len([]rune(opinion)) > 80 {