wcj 6 years ago
parent
commit
8624a65de3
2 changed files with 12 additions and 10 deletions
  1. 3 3
      core/src/qfw/manage/feedback.go
  2. 9 7
      core/src/qfw/manage/message.go

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

@@ -189,9 +189,9 @@ func (s *SystemManage) Updateback() error {
 			//
 			f := FindOne("user", "{'_id':'"+s_submitid+"'}")
 			if (*f)["s_m_openid"] != nil {
-				s_m_openid := (*f)["s_m_openid"].(string)
-				a_m_openid := (*f)["a_m_openid"].(string)
-				s_phone := (*f)["s_phone"].(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"])

+ 9 - 7
core/src/qfw/manage/message.go

@@ -55,15 +55,17 @@ func (m *Message) UpdateMes() bool {
 }
 
 //
-func (m *Message) AddUserOpenid() bool {
-	openids := m.GetString("userids")
-	ok := false
-	if openids == "-1" {
-		ok = redis.Del("other", "messageUserids")
+func (m *Message) AddUserOpenid() string {
+	userids := m.GetString("userids")
+	msg := ""
+	if userids == "" {
+		msg = "给所有人发消息"
+		redis.Del("other", "messageUserids")
 	} else {
-		ok = redis.Put("other", "messageUserids", openids, -1)
+		msg = "给" + userids + "发消息"
+		redis.Put("other", "messageUserids", userids, -1)
 	}
-	return ok
+	return msg
 }
 
 //