官方客服代码优化
This commit is contained in:
@@ -4,4 +4,8 @@ DROP COLUMN `AUTHOR_AVATAR`,
|
||||
DROP COLUMN `UP_COUNT`,
|
||||
DROP COLUMN `STAR_COUNT`;
|
||||
|
||||
#### 官方客服
|
||||
INSERT INTO `ddxhs`.`business_author` (`AUTHOR_ID`, `AUTHOR_NO`, `AUTHOR_NAME`, `AVATAR_ID`, `AVATAR_URL`, `DESCRIPTION`, `SEX`, `BIRTH`, `JOB`, `AREA`, `SCHOOL`, `BACK_GROUND_ID`, `BACK_GROUND_URL`, `FOLLOW`, `FANS`, `UP_COUNT`, `STAR_COUNT`, `AUTHOR_STATUS`, `VERSION`, `DELETED`, `CREATE_TIME`, `UPDATE_TIME`, `IP_ADDRESS`, `IP_REAL_ADDRESS`, `REAL_NAME`, `ID_CARD`, `PHONE_NUMBER`) VALUES ('8', '8', '官方客服', NULL, 'http://8.146.211.120:8080/upload/avatar/kefu.jpg', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '0', '0', '0', '0', '0', '0', '2025-01-09 18:20:57', '2025-01-10 22:49:50', '222.137.130.228', '郑州', NULL, NULL, '8');
|
||||
|
||||
|
||||
|
||||
|
@@ -57,7 +57,6 @@ public class StarNotesServiceImpl extends ServiceImpl<StarNotesMapper, StarNotes
|
||||
public void readMessage(String authorId) {
|
||||
LambdaUpdateWrapper<StarNotes> queryWrapper = new LambdaUpdateWrapper();
|
||||
queryWrapper.eq(StarNotes::getAuthorId,authorId);
|
||||
queryWrapper.ne(StarNotes::getFollowId,authorId);
|
||||
queryWrapper.set(StarNotes::getMessageStatus,1);
|
||||
this.update(queryWrapper);
|
||||
}
|
||||
|
@@ -62,7 +62,6 @@ public class UpNotesServiceImpl extends ServiceImpl<UpNotesMapper, UpNotes> impl
|
||||
public void readMessage(String authorId) {
|
||||
LambdaUpdateWrapper<UpNotes> queryWrapper = new LambdaUpdateWrapper();
|
||||
queryWrapper.eq(UpNotes::getAuthorId,authorId);
|
||||
queryWrapper.ne(UpNotes::getFollowId,authorId);
|
||||
queryWrapper.set(UpNotes::getMessageStatus,1);
|
||||
this.update(queryWrapper);
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
package com.dd.admin.business.webSocket.handler;
|
||||
package com.dd.admin.business.webSocket.handler;
|
@@ -56,7 +56,7 @@ public class ApiInterceptor implements HandlerInterceptor {
|
||||
|
||||
Author author = authorService.getById(authorId);
|
||||
if(author==null){
|
||||
throw new ApiException(700,"token已失效");
|
||||
throw new ApiException(700,"该用户已删除~");
|
||||
}
|
||||
request.setAttribute("author",author);
|
||||
if(author.getAuthorStatus()!=null&&author.getAuthorStatus().equals(1)){
|
||||
|
@@ -42,7 +42,7 @@
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
webSocketManager.connect('ws://192.168.1.136:9326/?authorId=8')
|
||||
webSocketManager.connect('ws://192.168.10.98:9326/?authorId=8')
|
||||
|
||||
// 设置收到消息回调函数
|
||||
webSocketManager.onMessage((data) => {
|
||||
@@ -51,6 +51,7 @@
|
||||
console.log(JSON.stringify(data.body))
|
||||
const {IMUI} = this.$refs;
|
||||
IMUI.appendMessage(data.body);
|
||||
IMUI.messageViewToBottom()
|
||||
}
|
||||
});
|
||||
|
||||
@@ -97,8 +98,6 @@
|
||||
console.log('发送了信息')
|
||||
message.handlerType = '6'
|
||||
webSocketManager.sendMessage(JSON.stringify(message))
|
||||
|
||||
|
||||
//执行到next消息会停止转圈,如果接口调用失败,可以修改消息的状态 next({status:'failed'});
|
||||
next();
|
||||
},
|
||||
|
Reference in New Issue
Block a user