|
@@ -594,18 +594,19 @@ func UserSynchronousList(customerServiceId, userId, entId, messageId int64, crea
|
|
|
create_time := nowForm.Format(util.Date_Full_Layout)
|
|
|
//查看汇总表
|
|
|
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 {
|
|
|
- customerServiceId = 1
|
|
|
+ customer_service_access = 1
|
|
|
} else {
|
|
|
- customerServiceId = quitl.Int64All((*data)["customer_service_access"])
|
|
|
+ customer_service_access = quitl.Int64All((*data)["customer_service_access"])
|
|
|
}
|
|
|
//更新汇总表
|
|
|
ok := int64(0)
|
|
|
if sendUserType == 1 {
|
|
|
- ok = IC.BaseMysql.UpdateOrDeleteBySql(fmt.Sprintf("UPDATE socialize_summary SET message_id = %d, unread = unread+1, customer_service_access = %d WHERE user_id = %d and ent_id= %d", messageId, customerServiceId, userId, entId))
|
|
|
+ ok = IC.BaseMysql.UpdateOrDeleteBySql(fmt.Sprintf("UPDATE socialize_summary SET message_id = %d, unread = unread+1, customer_service_access = %d WHERE user_id = %d and ent_id= %d", messageId, customer_service_access, userId, entId))
|
|
|
} else {
|
|
|
- ok = IC.BaseMysql.UpdateOrDeleteBySql(fmt.Sprintf("UPDATE socialize_summary SET message_id = %d, customer_service_access = %d WHERE user_id = %d and ent_id= %d", messageId, customerServiceId, userId, entId))
|
|
|
+ ok = IC.BaseMysql.UpdateOrDeleteBySql(fmt.Sprintf("UPDATE socialize_summary SET message_id = %d, customer_service_access = %d WHERE user_id = %d and ent_id= %d", messageId, customer_service_access, userId, entId))
|
|
|
}
|
|
|
if ok > 0 && customerServiceId > 0 {
|
|
|
//判断客服用户表是否存在
|