|
@@ -644,13 +644,17 @@ func UserSynchronousList(customerServiceId, userId, entId, messageId int64, crea
|
|
|
"message_id": messageId,
|
|
|
})
|
|
|
//新增客服用户表
|
|
|
- if ok > 0 && customerServiceId > 0 {
|
|
|
- IC.BaseMysql.InsertByTx(tx, util.SOCIALIZE_CUSTOMER_SERVICE_USER, map[string]interface{}{
|
|
|
- "user_id": userId,
|
|
|
- "ent_id": entId,
|
|
|
- "customer_service_id": customerServiceId,
|
|
|
- "unread": quitl.If(sendUserType == 1, 0, 1),
|
|
|
- })
|
|
|
+ if ok > 0 {
|
|
|
+ if customerServiceId > 0 {
|
|
|
+ if id := IC.BaseMysql.InsertByTx(tx, util.SOCIALIZE_CUSTOMER_SERVICE_USER, map[string]interface{}{
|
|
|
+ "user_id": userId,
|
|
|
+ "ent_id": entId,
|
|
|
+ "customer_service_id": customerServiceId,
|
|
|
+ "unread": quitl.If(sendUserType == 1, 0, 1),
|
|
|
+ }); id <= 0 {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
return false
|
|
|
}
|