Jelajahi Sumber

日志添加

WH01243 2 tahun lalu
induk
melakukan
89fa8dde6e
1 mengubah file dengan 3 tambahan dan 26 penghapusan
  1. 3 26
      service/message_mail_box.go

+ 3 - 26
service/message_mail_box.go

@@ -599,12 +599,12 @@ func UserSynchronousList(customerServiceId, userId, entId, messageId int64, crea
 	data := IC.BaseMysql.FindOne(util.SOCIALIZE_SUMMARY, map[string]interface{}{"user_id": userId, "ent_id": entId}, "customer_service_access", "")
 	customer_service_access := 0
 	if data != nil && len(*data) > 0 {
-		if (*data)["customer_service_access"] == 0 && customerServiceId > 0 {
+		if quitl.IntAll((*data)["customer_service_access"]) == 0 && customerServiceId > 0 {
 			customer_service_access = 1
 		} else {
 			customer_service_access = quitl.IntAll((*data)["customer_service_access"])
 		}
-		log.Println(customer_service_access, "customer_service_access打印", (*data)["customer_service_access"], customerServiceId, (*data)["customer_service_access"] == 0 && customerServiceId > 0)
+		log.Println(customer_service_access, "customer_service_access打印", (*data)["customer_service_access"], customerServiceId, quitl.IntAll((*data)["customer_service_access"]) == 0 && customerServiceId > 0)
 		//更新汇总表
 		ok := int64(0)
 		if sendUserType == 1 {
@@ -923,31 +923,8 @@ func (b MessaggeService) UpdateReadById(in *messagecenter.ReadStateReq) bool {
 		}
 		fool := IC.BaseMysql.Update(util.SOCIALIZE_MESSAGE_MAILBOX, updateMap, map[string]interface{}{"read_time": time.Now().Local().Format(util.Date_Full_Layout), "isread": 1})
 		if fool {
-			//查询此条信息拥有者
-			data := IC.BaseMysql.FindOne(util.SOCIALIZE_MESSAGE_MAILBOX, updateMap, "receive_user_type", "")
-			if data != nil {
-				userType := int64(1)
-				userId := int64(0)
-				if (*data)["receive_user_type"] == 2 {
-					userType = 2
-					userId = in.EntUserId
-				} else {
-					userType = 1
-					userId = in.NewUserId
-				}
-				pc_a, err := util.GetData(userType, userId)
-				if fool {
-					if err == nil && pc_a != nil {
-						//id一致
-						if in.MessageId == pc_a.Data["id"] {
-							util.SetData(userType, userId, map[string]interface{}{"data": map[string]interface{}{}, "count": pc_a.Count - 1}, IC.SurvivalTime)
-						} else {
-							util.SetData(userType, userId, map[string]interface{}{"data": data, "count": pc_a.Count - 1}, IC.SurvivalTime)
-						}
-					}
-				}
+			//汇总表数据处理
 
-			}
 		}
 		return fool
 	})