|
@@ -189,7 +189,9 @@ func (s *SystemManage) Updateback() error {
|
|
|
//
|
|
|
f := FindOne("user", "{'_id':'"+s_submitid+"'}")
|
|
|
if (*f)["s_m_openid"] != nil {
|
|
|
- openid := (*f)["s_m_openid"].(string)
|
|
|
+ s_m_openid := (*f)["s_m_openid"].(string)
|
|
|
+ a_m_openid := (*f)["a_m_openid"].(string)
|
|
|
+ s_phone := (*f)["s_phone"].(string)
|
|
|
opinion := s.GetString("s_opinion")
|
|
|
if (*f)["i_appid"] == 2 {
|
|
|
userType := util.IntAll((*f)["i_type"])
|
|
@@ -198,7 +200,7 @@ func (s *SystemManage) Updateback() error {
|
|
|
//微信发送模板消息
|
|
|
isWxReply, isAppReply := false, false
|
|
|
if s_from == "" {
|
|
|
- if userType == 0 && openid != "" {
|
|
|
+ if userType == 0 && s_m_openid != "" {
|
|
|
isWxReply = true
|
|
|
}
|
|
|
//app推送极光消息
|
|
@@ -210,33 +212,40 @@ func (s *SystemManage) Updateback() error {
|
|
|
isAppReply = true
|
|
|
}
|
|
|
} else if s_from == "wx" {
|
|
|
- if openid != "" {
|
|
|
+ if s_m_openid != "" {
|
|
|
isWxReply = true
|
|
|
}
|
|
|
}
|
|
|
if isWxReply {
|
|
|
- msgurl := coreconfig.SysConfig.JyWebdomain + "/front/sess/" + seTopnet.EncodeString(openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",myfeedbacks")
|
|
|
+ msgurl := coreconfig.SysConfig.JyWebdomain + "/front/sess/" + seTopnet.EncodeString(s_m_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",myfeedbacks")
|
|
|
s_result := "剑鱼客服回复了您的问题!"
|
|
|
s_detail := "问题回复"
|
|
|
s_remark := " " + opinion
|
|
|
s_submitdate := s.GetString("l_submitdate")
|
|
|
- log.Println("微信模板消息-意见反馈答复", openid)
|
|
|
- coreutil.JyWeixinRpc.SendFeedbackNotifyMsg(&qrpc.NotifyMsg{Openid: openid, Title: s_result, Detail: s_detail, Date: s_submitdate, Remark: s_remark, Url: msgurl})
|
|
|
+ log.Println("微信模板消息-意见反馈答复", s_m_openid)
|
|
|
+ coreutil.JyWeixinRpc.SendFeedbackNotifyMsg(&qrpc.NotifyMsg{Openid: s_m_openid, Title: s_result, Detail: s_detail, Date: s_submitdate, Remark: s_remark, Url: msgurl})
|
|
|
}
|
|
|
if isAppReply {
|
|
|
- msgurl := "/jyapp/free/sess/" + seTopnet.EncodeString(openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",myfeedbacks")
|
|
|
+ sess_openid := a_m_openid
|
|
|
+ if sess_openid == "" {
|
|
|
+ sess_openid = s_phone
|
|
|
+ }
|
|
|
+ if sess_openid == "" {
|
|
|
+ sess_openid = s_m_openid
|
|
|
+ }
|
|
|
+ msgurl := "/jyapp/free/sess/" + seTopnet.EncodeString(sess_openid+",uid,"+strconv.Itoa(int(time.Now().Unix()))+",myfeedbacks")
|
|
|
ponetype, _ := (*f)["s_appponetype"].(string)
|
|
|
if jpushid != "" || opushid != "" {
|
|
|
if len([]rune(opinion)) > 80 {
|
|
|
opinion = string([]rune(opinion)[:80]) + "..."
|
|
|
}
|
|
|
- log.Println("极光推送-意见反馈答复", openid, jpushid)
|
|
|
+ log.Println("极光推送-意见反馈答复", sess_openid, jpushid)
|
|
|
go coreutil.AppPushServiceCall(map[string]interface{}{
|
|
|
"phoneType": ponetype,
|
|
|
"otherPushId": opushid,
|
|
|
"jgPushId": jpushid,
|
|
|
"url": msgurl,
|
|
|
- "openId": openid,
|
|
|
+ "openId": sess_openid,
|
|
|
"userId": s_submitid,
|
|
|
"type": "feedback",
|
|
|
"descript": opinion,
|
|
@@ -254,7 +263,7 @@ func (s *SystemManage) Updateback() error {
|
|
|
s_detail := "以下是对你提交“" + title + "”意见的回复结果"
|
|
|
s_remark := " " + opinion
|
|
|
go func() {
|
|
|
- coreutil.SendManagerNotifyMsg(&qrpc.NotifyMsg{Openid: openid, Title: s_result, Detail: s_detail, Remark: s_remark})
|
|
|
+ coreutil.SendManagerNotifyMsg(&qrpc.NotifyMsg{Openid: s_m_openid, Title: s_result, Detail: s_detail, Remark: s_remark})
|
|
|
}()
|
|
|
}
|
|
|
}
|