Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cxt104926
Stusystem
提交
a8db5171
S
Stusystem
项目概览
cxt104926
/
Stusystem
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Stusystem
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
a8db5171
编写于
6月 15, 2021
作者:
cxt104926
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
聊天
上级
45554745
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
209 addition
and
16 deletion
+209
-16
src/main/java/com/stu/stusystem/controller/chat/ChatController.java
...ava/com/stu/stusystem/controller/chat/ChatController.java
+29
-3
src/main/java/com/stu/stusystem/controller/chat/ChatMsgController.java
.../com/stu/stusystem/controller/chat/ChatMsgController.java
+36
-0
src/main/java/com/stu/stusystem/mapper/chat/ChatMsgMapper.java
...ain/java/com/stu/stusystem/mapper/chat/ChatMsgMapper.java
+16
-0
src/main/java/com/stu/stusystem/model/chat/ChatMsg.java
src/main/java/com/stu/stusystem/model/chat/ChatMsg.java
+4
-1
src/main/java/com/stu/stusystem/service/chat/ChatMsgService.java
...n/java/com/stu/stusystem/service/chat/ChatMsgService.java
+29
-0
src/main/resources/config/liquibase/20200907_creat_table_StuUser.xml
...sources/config/liquibase/20200907_creat_table_StuUser.xml
+4
-2
src/main/resources/config/liquibase/20200914_creat_table_log.xml
...n/resources/config/liquibase/20200914_creat_table_log.xml
+0
-2
src/main/resources/config/liquibase/20210323_creat_table_stuClass.xml
...ources/config/liquibase/20210323_creat_table_stuClass.xml
+0
-2
src/main/resources/config/liquibase/20210329_creat_table_menu.xml
.../resources/config/liquibase/20210329_creat_table_menu.xml
+0
-2
src/main/resources/config/liquibase/20210331_creat_table_role.xml
.../resources/config/liquibase/20210331_creat_table_role.xml
+0
-2
src/main/resources/config/liquibase/20210331_creat_table_role_jurisdiction.xml
...nfig/liquibase/20210331_creat_table_role_jurisdiction.xml
+0
-2
src/main/resources/config/liquibase/20210615_creat_table_ChatFriends.xml
...ces/config/liquibase/20210615_creat_table_ChatFriends.xml
+23
-0
src/main/resources/config/liquibase/20210615_creat_table_ChatMsg.xml
...sources/config/liquibase/20210615_creat_table_ChatMsg.xml
+56
-0
src/main/resources/config/master.xml
src/main/resources/config/master.xml
+2
-0
src/main/resources/mapper/chat/ChatMsgMapper.xml
src/main/resources/mapper/chat/ChatMsgMapper.xml
+10
-0
未找到文件。
src/main/java/com/stu/stusystem/controller/chat/ChatController.java
浏览文件 @
a8db5171
...
@@ -33,6 +33,9 @@ public class ChatController {
...
@@ -33,6 +33,9 @@ public class ChatController {
log
.
info
(
"当前在线用户数:{}"
,
clients
.
size
());
log
.
info
(
"当前在线用户数:{}"
,
clients
.
size
());
// todo 查看哪些用户在线,查看clients中的key即可
// todo 查看哪些用户在线,查看clients中的key即可
// todo 在用户连接成功后需要查看有哪些用户在线 将在线用户信息返回去
// todo 在用户连接成功后需要查看有哪些用户在线 将在线用户信息返回去
sendMessage
(
session
,
"连接成功"
);
sendMessage
(
session
,
"连接成功"
);
...
@@ -49,9 +52,12 @@ public class ChatController {
...
@@ -49,9 +52,12 @@ public class ChatController {
try
{
try
{
ChatMsg
msg
=
mapper
.
readValue
(
message
,
ChatMsg
.
class
);
ChatMsg
msg
=
mapper
.
readValue
(
message
,
ChatMsg
.
class
);
if
(
"1"
.
equals
(
msg
.
getMsgType
()))
{
if
(
"1"
.
equals
(
msg
.
getMsgType
()))
{
//
群聊
//
广播
sendMessageAll
(
msg
.
getMsg
(),
msg
.
getSendUser
());
sendMessageAll
(
msg
.
getMsg
(),
msg
.
getSendUser
());
}
else
{
}
else
if
(
"2"
.
equals
(
msg
.
getMsgType
())){
// 群聊
sendMessageGroup
(
msg
.
getMsg
(),
msg
.
getMsg
());
}
else
if
(
"3"
.
equals
(
msg
.
getMsgType
())){
sendMessage
(
session
,
msg
.
getMsg
());
sendMessage
(
session
,
msg
.
getMsg
());
}
}
}
catch
(
JsonProcessingException
e
)
{
}
catch
(
JsonProcessingException
e
)
{
...
@@ -106,12 +112,31 @@ public class ChatController {
...
@@ -106,12 +112,31 @@ public class ChatController {
}
}
/**
/**
*
群发
*
广播
*
*
* @param message 发送的消息
* @param message 发送的消息
* @param username 发送人
* @param username 发送人
*/
*/
public
static
void
sendMessageAll
(
String
message
,
String
username
)
{
public
static
void
sendMessageAll
(
String
message
,
String
username
)
{
log
.
info
(
"广播消息"
);
clients
.
forEach
((
key
,
session
)
->
{
if
(!
username
.
equals
(
key
))
{
RemoteEndpoint
.
Async
remote
=
session
.
getAsyncRemote
();
if
(
remote
==
null
)
{
return
;
}
remote
.
sendText
(
message
);
}
});
}
/**
* 群聊
*
* @param message 发送的消息
* @param username 发送人
*/
public
static
void
sendMessageGroup
(
String
message
,
String
username
)
{
log
.
info
(
"群发消息"
);
log
.
info
(
"群发消息"
);
clients
.
forEach
((
key
,
session
)
->
{
clients
.
forEach
((
key
,
session
)
->
{
if
(!
username
.
equals
(
key
))
{
if
(!
username
.
equals
(
key
))
{
...
@@ -124,6 +149,7 @@ public class ChatController {
...
@@ -124,6 +149,7 @@ public class ChatController {
});
});
}
}
/**
/**
* 单聊
* 单聊
*
*
...
...
src/main/java/com/stu/stusystem/controller/chat/ChatMsgController.java
0 → 100644
浏览文件 @
a8db5171
package
com.stu.stusystem.controller.chat
;
import
com.stu.stusystem.service.chat.ChatMsgService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author: cxt
* @time: 2021/6/15
*/
@RestController
@RequestMapping
(
"/chat/msg"
)
public
class
ChatMsgController
{
private
ChatMsgService
chatMsgService
;
@ApiOperation
(
"好友列表"
)
@GetMapping
(
"/get"
)
public
Object
getFriends
(
@RequestParam
(
"id"
)
String
id
){
this
.
chatMsgService
.
getFriends
(
id
);
return
null
;
}
@Autowired
public
void
setChatMsgService
(
ChatMsgService
chatMsgService
)
{
this
.
chatMsgService
=
chatMsgService
;
}
}
src/main/java/com/stu/stusystem/mapper/chat/ChatMsgMapper.java
0 → 100644
浏览文件 @
a8db5171
package
com.stu.stusystem.mapper.chat
;
import
com.stu.stusystem.common.CommonMapper
;
import
com.stu.stusystem.model.chat.ChatMsg
;
import
com.stu.stusystem.service.system.vo.StuUserVO
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* @author: cxt
* @time: 2021/6/15
*/
public
interface
ChatMsgMapper
extends
CommonMapper
<
ChatMsg
>
{
List
<
StuUserVO
>
getFriends
(
@Param
(
"fId"
)
String
fId
);
}
src/main/java/com/stu/stusystem/model/chat/ChatMsg.java
浏览文件 @
a8db5171
package
com.stu.stusystem.model.chat
;
package
com.stu.stusystem.model.chat
;
import
com.stu.stusystem.common.BaseModel
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
...
@@ -11,7 +12,9 @@ import lombok.NoArgsConstructor;
...
@@ -11,7 +12,9 @@ import lombok.NoArgsConstructor;
@Data
@Data
@AllArgsConstructor
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor
public
class
ChatMsg
{
public
class
ChatMsg
extends
BaseModel
{
private
String
id
;
// 消息内容
// 消息内容
private
String
msg
;
private
String
msg
;
...
...
src/main/java/com/stu/stusystem/service/chat/ChatMsgService.java
0 → 100644
浏览文件 @
a8db5171
package
com.stu.stusystem.service.chat
;
import
com.stu.stusystem.mapper.chat.ChatMsgMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
/**
* @author: cxt
* @time: 2021/6/15
*/
@Service
public
class
ChatMsgService
{
private
ChatMsgMapper
chatMsgMapper
;
public
void
getFriends
(
String
id
)
{
this
.
chatMsgMapper
.
getFriends
(
id
);
}
@Autowired
public
void
setChatMsgMapper
(
ChatMsgMapper
chatMsgMapper
)
{
this
.
chatMsgMapper
=
chatMsgMapper
;
}
}
src/main/resources/config/liquibase/20200907_creat_table_StuUser.xml
浏览文件 @
a8db5171
...
@@ -3,10 +3,8 @@
...
@@ -3,10 +3,8 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
<property
name=
"now"
value=
"now()"
dbms=
"h2"
/>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"floatType"
value=
"float4"
dbms=
"postgresql, h2"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<!--
<!--
Added the entity StuUser.
Added the entity StuUser.
...
@@ -45,6 +43,10 @@
...
@@ -45,6 +43,10 @@
<constraints
nullable=
"true"
/>
<constraints
nullable=
"true"
/>
</column>
</column>
<column
name=
"head_img"
type=
"varchar(22)"
remarks=
"头像id"
>
<constraints
nullable=
"true"
/>
</column>
<column
name=
"create_time"
type=
"datetime"
remarks=
"创建时间"
>
<column
name=
"create_time"
type=
"datetime"
remarks=
"创建时间"
>
<constraints
nullable=
"false"
/>
<constraints
nullable=
"false"
/>
</column>
</column>
...
...
src/main/resources/config/liquibase/20200914_creat_table_log.xml
浏览文件 @
a8db5171
...
@@ -3,10 +3,8 @@
...
@@ -3,10 +3,8 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
<property
name=
"now"
value=
"now()"
dbms=
"h2"
/>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"floatType"
value=
"float4"
dbms=
"postgresql, h2"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<!--
<!--
Added the entity test.
Added the entity test.
...
...
src/main/resources/config/liquibase/20210323_creat_table_stuClass.xml
浏览文件 @
a8db5171
...
@@ -3,10 +3,8 @@
...
@@ -3,10 +3,8 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
<property
name=
"now"
value=
"now()"
dbms=
"h2"
/>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"floatType"
value=
"float4"
dbms=
"postgresql, h2"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<!--
<!--
Added the entity stu_class.
Added the entity stu_class.
...
...
src/main/resources/config/liquibase/20210329_creat_table_menu.xml
浏览文件 @
a8db5171
...
@@ -3,10 +3,8 @@
...
@@ -3,10 +3,8 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
<property
name=
"now"
value=
"now()"
dbms=
"h2"
/>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"floatType"
value=
"float4"
dbms=
"postgresql, h2"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<!--
<!--
Added the entity menu.
Added the entity menu.
...
...
src/main/resources/config/liquibase/20210331_creat_table_role.xml
浏览文件 @
a8db5171
...
@@ -3,10 +3,8 @@
...
@@ -3,10 +3,8 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
<property
name=
"now"
value=
"now()"
dbms=
"h2"
/>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"floatType"
value=
"float4"
dbms=
"postgresql, h2"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<!--
<!--
Added the entity menu.
Added the entity menu.
...
...
src/main/resources/config/liquibase/20210331_creat_table_role_jurisdiction.xml
浏览文件 @
a8db5171
...
@@ -3,10 +3,8 @@
...
@@ -3,10 +3,8 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
<property
name=
"now"
value=
"now()"
dbms=
"h2"
/>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"floatType"
value=
"float4"
dbms=
"postgresql, h2"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<!--
<!--
Added the entity menu.
Added the entity menu.
...
...
src/main/resources/config/liquibase/20210615_creat_table_ChatFriends.xml
0 → 100644
浏览文件 @
a8db5171
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<!--
Added the entity ChatFriends.
-->
<changeSet
id=
"20210615-01"
author=
"cxt"
>
<createTable
tableName=
"chat_friends"
remarks=
"好友表"
>
<column
name=
"id"
type=
"varchar(22)"
>
<constraints
primaryKey=
"true"
nullable=
"false"
/>
</column>
<column
name=
"f_id"
type=
"varchar(22)"
>
<constraints
nullable=
"false"
/>
</column>
</createTable>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
src/main/resources/config/liquibase/20210615_creat_table_ChatMsg.xml
0 → 100644
浏览文件 @
a8db5171
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"
>
<property
name=
"now"
value=
"now()"
dbms=
"mysql"
/>
<property
name=
"autoIncrement"
value=
"true"
/>
<property
name=
"floatType"
value=
"float"
dbms=
"mysql, oracle, mssql"
/>
<!--
Added the entity ChatMsg.
-->
<changeSet
id=
"20210615-01"
author=
"cxt"
>
<createTable
tableName=
"chat_msg"
remarks=
"聊天消息"
>
<column
name=
"id"
type=
"varchar(22)"
>
<constraints
primaryKey=
"true"
nullable=
"false"
/>
</column>
<column
name=
"msg"
type=
"varchar(300)"
remarks=
"消息内容"
>
<constraints
nullable=
"false"
/>
</column>
<column
name=
"accept_user"
type=
"varchar(22)"
remarks=
"接收消息id"
>
<constraints
nullable=
"false"
/>
</column>
<column
name=
"send_user"
type=
"varchar(22)"
remarks=
"发送消息id"
>
<constraints
nullable=
"false"
/>
</column>
<column
name=
"send_type"
type=
"varchar(2)"
remarks=
"发送消息id"
>
<constraints
nullable=
"false"
/>
</column>
<column
name=
"msg_type"
type=
"varchar(2)"
remarks=
"消息类型"
>
<constraints
nullable=
"false"
/>
</column>
<column
name=
"create_time"
type=
"datetime"
remarks=
"创建时间"
>
<constraints
nullable=
"false"
/>
</column>
<column
name=
"create_by"
type=
"varchar(18)"
remarks=
"创建人"
>
<constraints
nullable=
"false"
/>
</column>
<column
name=
"update_time"
type=
"datetime"
remarks=
"更新时间"
>
<constraints
nullable=
"true"
/>
</column>
<column
name=
"update_by"
type=
"varchar(18)"
remarks=
"更新人"
>
<constraints
nullable=
"true"
/>
</column>
</createTable>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
src/main/resources/config/master.xml
浏览文件 @
a8db5171
...
@@ -10,5 +10,7 @@
...
@@ -10,5 +10,7 @@
<include
file=
"classpath:config/liquibase/20210329_creat_table_menu.xml"
relativeToChangelogFile=
"false"
/>
<include
file=
"classpath:config/liquibase/20210329_creat_table_menu.xml"
relativeToChangelogFile=
"false"
/>
<include
file=
"classpath:config/liquibase/20210331_creat_table_role.xml"
relativeToChangelogFile=
"false"
/>
<include
file=
"classpath:config/liquibase/20210331_creat_table_role.xml"
relativeToChangelogFile=
"false"
/>
<include
file=
"classpath:config/liquibase/20210331_creat_table_role_jurisdiction.xml"
relativeToChangelogFile=
"false"
/>
<include
file=
"classpath:config/liquibase/20210331_creat_table_role_jurisdiction.xml"
relativeToChangelogFile=
"false"
/>
<include
file=
"classpath:config/liquibase/20210615_creat_table_ChatFriends.xml"
relativeToChangelogFile=
"false"
/>
<include
file=
"classpath:config/liquibase/20210615_creat_table_ChatMsg.xml"
relativeToChangelogFile=
"false"
/>
</databaseChangeLog>
</databaseChangeLog>
\ No newline at end of file
src/main/resources/mapper/chat/ChatMsgMapper.xml
0 → 100644
浏览文件 @
a8db5171
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.stu.stusystem.mapper.chat.ChatMsgMapper"
>
<select
id=
"getFriends"
resultType=
"com.stu.stusystem.service.system.vo.StuUserVO"
>
SELECT su.id, su.name, su.head_img AS headImg
FROM chat_friends cf
LEFT JOIN stu_user su ON cf.f_id = su.id
</select>
</mapper>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录