Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
c52a8fc6
Commit
c52a8fc6
authored
Jun 05, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单人rtc查找完善
parent
42b326a2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
16 deletions
+31
-16
core/src/main/java/com/wecloud/im/controller/ImRtcRecordController.java
+4
-4
core/src/main/java/com/wecloud/im/param/rtc/SingleRtcRecordParam.java
+12
-2
core/src/main/java/com/wecloud/im/service/ImRtcRecordService.java
+2
-2
core/src/main/java/com/wecloud/im/service/impl/ImRtcRecordServiceImpl.java
+13
-8
No files found.
core/src/main/java/com/wecloud/im/controller/ImRtcRecordController.java
View file @
c52a8fc6
...
@@ -3,7 +3,7 @@ package com.wecloud.im.controller;
...
@@ -3,7 +3,7 @@ package com.wecloud.im.controller;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.wecloud.im.entity.ImRtcRecord
;
import
com.wecloud.im.entity.ImRtcRecord
;
import
com.wecloud.im.param.rtc.RtcRecordParam
;
import
com.wecloud.im.param.rtc.
Single
RtcRecordParam
;
import
com.wecloud.im.service.ImRtcRecordService
;
import
com.wecloud.im.service.ImRtcRecordService
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.api.ApiResult
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
import
io.geekidea.springbootplus.framework.common.controller.BaseController
;
...
@@ -32,9 +32,9 @@ public class ImRtcRecordController extends BaseController {
...
@@ -32,9 +32,9 @@ public class ImRtcRecordController extends BaseController {
@PostMapping
(
"/listRtcRecords"
)
@PostMapping
(
"/listRtcRecords"
)
@ApiOperation
(
value
=
"分页获取后台通话记录"
)
@ApiOperation
(
value
=
"分页获取后台通话记录"
)
public
ApiResult
<
Page
<
ImRtcRecord
>>
listRtcRecords
(
@RequestBody
RtcRecordParam
r
tcRecordParam
){
public
ApiResult
<
Page
<
ImRtcRecord
>>
listRtcRecords
(
@RequestBody
SingleRtcRecordParam
singleR
tcRecordParam
){
log
.
info
(
"获取后台通话记录入参 {}"
,
JSON
.
toJSONString
(
r
tcRecordParam
));
log
.
info
(
"获取后台通话记录入参 {}"
,
JSON
.
toJSONString
(
singleR
tcRecordParam
));
return
ApiResult
.
ok
(
rtcRecordService
.
getPageImRtcRecords
(
r
tcRecordParam
));
return
ApiResult
.
ok
(
rtcRecordService
.
getPageImRtcRecords
(
singleR
tcRecordParam
));
}
}
}
}
core/src/main/java/com/wecloud/im/param/rtc/RtcRecordParam.java
→
core/src/main/java/com/wecloud/im/param/rtc/
Single
RtcRecordParam.java
View file @
c52a8fc6
package
com
.
wecloud
.
im
.
param
.
rtc
;
package
com
.
wecloud
.
im
.
param
.
rtc
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
...
@@ -10,37 +12,45 @@ import java.io.Serializable;
...
@@ -10,37 +12,45 @@ import java.io.Serializable;
* @apiNote
* @apiNote
*/
*/
@Data
@Data
public
class
RtcRecordParam
implements
Serializable
{
@ApiModel
(
value
=
"单人rtc音视频查找记录"
)
public
class
SingleRtcRecordParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1
L
;
private
static
final
long
serialVersionUID
=
2176804812523348248
L
;
/**
/**
* 发送者id
* 发送者id
*/
*/
@ApiModelProperty
(
"发送者id"
)
private
String
fromClientId
;
private
String
fromClientId
;
/**
/**
* 接受者id
* 接受者id
*/
*/
@ApiModelProperty
(
"接受者id"
)
private
String
toClientId
;
private
String
toClientId
;
/**
/**
* 房间id
* 房间id
*/
*/
@ApiModelProperty
(
"房间id"
)
private
String
channelId
;
private
String
channelId
;
/**
/**
* 音视频类型
* 音视频类型
* @see com.wecloud.im.sdk.enums.CallTypeEnum
*/
*/
@ApiModelProperty
(
"音视频类型"
)
private
Integer
callType
;
private
Integer
callType
;
/***
/***
* 页码
* 页码
*/
*/
@ApiModelProperty
(
"页码"
)
private
Integer
pageNum
;
private
Integer
pageNum
;
/**
/**
* 每页数量
* 每页数量
*/
*/
@ApiModelProperty
(
"每页数量"
)
private
Integer
pageSize
;
private
Integer
pageSize
;
}
}
core/src/main/java/com/wecloud/im/service/ImRtcRecordService.java
View file @
c52a8fc6
...
@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...
@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
com.wecloud.im.entity.ImClient
;
import
com.wecloud.im.entity.ImClient
;
import
com.wecloud.im.entity.ImRtcRecord
;
import
com.wecloud.im.entity.ImRtcRecord
;
import
com.wecloud.im.param.rtc.CreateRtcChannelParam
;
import
com.wecloud.im.param.rtc.CreateRtcChannelParam
;
import
com.wecloud.im.param.rtc.RtcRecordParam
;
import
com.wecloud.im.param.rtc.
Single
RtcRecordParam
;
import
io.geekidea.springbootplus.framework.common.service.BaseService
;
import
io.geekidea.springbootplus.framework.common.service.BaseService
;
/**
/**
...
@@ -33,5 +33,5 @@ public interface ImRtcRecordService extends BaseService<ImRtcRecord> {
...
@@ -33,5 +33,5 @@ public interface ImRtcRecordService extends BaseService<ImRtcRecord> {
/**
/**
* 获取通话记录
* 获取通话记录
*/
*/
Page
<
ImRtcRecord
>
getPageImRtcRecords
(
RtcRecordParam
r
tcRecordParam
);
Page
<
ImRtcRecord
>
getPageImRtcRecords
(
SingleRtcRecordParam
singleR
tcRecordParam
);
}
}
core/src/main/java/com/wecloud/im/service/impl/ImRtcRecordServiceImpl.java
View file @
c52a8fc6
...
@@ -8,7 +8,7 @@ import com.wecloud.im.entity.ImClient;
...
@@ -8,7 +8,7 @@ import com.wecloud.im.entity.ImClient;
import
com.wecloud.im.entity.ImRtcRecord
;
import
com.wecloud.im.entity.ImRtcRecord
;
import
com.wecloud.im.mapper.ImRtcRecordMapper
;
import
com.wecloud.im.mapper.ImRtcRecordMapper
;
import
com.wecloud.im.param.rtc.CreateRtcChannelParam
;
import
com.wecloud.im.param.rtc.CreateRtcChannelParam
;
import
com.wecloud.im.param.rtc.RtcRecordParam
;
import
com.wecloud.im.param.rtc.
Single
RtcRecordParam
;
import
com.wecloud.im.sdk.enums.RtcStateEnum
;
import
com.wecloud.im.sdk.enums.RtcStateEnum
;
import
com.wecloud.im.sdk.enums.SingleRtcOperateTypeEnum
;
import
com.wecloud.im.sdk.enums.SingleRtcOperateTypeEnum
;
import
com.wecloud.im.service.ImClientService
;
import
com.wecloud.im.service.ImClientService
;
...
@@ -16,10 +16,10 @@ import com.wecloud.im.service.ImRtcRecordService;
...
@@ -16,10 +16,10 @@ import com.wecloud.im.service.ImRtcRecordService;
import
com.wecloud.utils.SnowflakeUtil
;
import
com.wecloud.utils.SnowflakeUtil
;
import
io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl
;
import
io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -32,6 +32,9 @@ import java.util.Date;
...
@@ -32,6 +32,9 @@ import java.util.Date;
@Service
@Service
public
class
ImRtcRecordServiceImpl
extends
BaseServiceImpl
<
ImRtcRecordMapper
,
ImRtcRecord
>
implements
ImRtcRecordService
{
public
class
ImRtcRecordServiceImpl
extends
BaseServiceImpl
<
ImRtcRecordMapper
,
ImRtcRecord
>
implements
ImRtcRecordService
{
@Resource
private
ImClientService
imClientService
;
@Async
@Async
@Override
@Override
...
@@ -90,14 +93,16 @@ public class ImRtcRecordServiceImpl extends BaseServiceImpl<ImRtcRecordMapper, I
...
@@ -90,14 +93,16 @@ public class ImRtcRecordServiceImpl extends BaseServiceImpl<ImRtcRecordMapper, I
}
}
@Override
@Override
public
Page
<
ImRtcRecord
>
getPageImRtcRecords
(
RtcRecordParam
rtcRecordParam
)
{
public
Page
<
ImRtcRecord
>
getPageImRtcRecords
(
SingleRtcRecordParam
singleRtcRecordParam
)
{
ImClient
imClient
=
imClientService
.
getCurrentClient
();
LambdaQueryWrapper
<
ImRtcRecord
>
rtcRecordLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
ImRtcRecord
>
rtcRecordLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
rtcRecordLambdaQueryWrapper
.
like
(
rtcRecordParam
.
getFromClientId
()!=
null
,
ImRtcRecord:
:
getFromClientId
,
rtcRecordParam
.
getFromClientId
());
rtcRecordLambdaQueryWrapper
.
eq
(
ImRtcRecord:
:
getFkAppid
,
imClient
.
getFkAppid
());
rtcRecordLambdaQueryWrapper
.
like
(
rtcRecordParam
.
getToClientId
()!=
null
,
ImRtcRecord:
:
getToClientId
,
rtcRecordParam
.
getToClientId
());
rtcRecordLambdaQueryWrapper
.
eq
(
singleRtcRecordParam
.
getFromClientId
()!=
null
,
ImRtcRecord:
:
getFromClientId
,
singleRtcRecordParam
.
getFromClientId
());
rtcRecordLambdaQueryWrapper
.
like
(
rtcRecordParam
.
getChannelId
()!=
null
,
ImRtcRecord:
:
getChannelId
,
rtcRecordParam
.
getChannelId
());
rtcRecordLambdaQueryWrapper
.
eq
(
singleRtcRecordParam
.
getToClientId
()!=
null
,
ImRtcRecord:
:
getToClientId
,
singleRtcRecordParam
.
getToClientId
());
rtcRecordLambdaQueryWrapper
.
eq
(
rtcRecordParam
.
getCallType
()!=
null
,
ImRtcRecord:
:
getCallType
,
rtcRecordParam
.
getCallType
());
rtcRecordLambdaQueryWrapper
.
eq
(
singleRtcRecordParam
.
getChannelId
()!=
null
,
ImRtcRecord:
:
getChannelId
,
singleRtcRecordParam
.
getChannelId
());
rtcRecordLambdaQueryWrapper
.
eq
(
singleRtcRecordParam
.
getCallType
()!=
null
,
ImRtcRecord:
:
getCallType
,
singleRtcRecordParam
.
getCallType
());
rtcRecordLambdaQueryWrapper
.
orderByDesc
(
ImRtcRecord:
:
getCreateTime
);
rtcRecordLambdaQueryWrapper
.
orderByDesc
(
ImRtcRecord:
:
getCreateTime
);
Page
<
ImRtcRecord
>
pageParam
=
new
Page
<>(
rtcRecordParam
.
getPageNum
(),
r
tcRecordParam
.
getPageSize
());
Page
<
ImRtcRecord
>
pageParam
=
new
Page
<>(
singleRtcRecordParam
.
getPageNum
(),
singleR
tcRecordParam
.
getPageSize
());
Page
<
ImRtcRecord
>
page
=
this
.
page
(
pageParam
,
rtcRecordLambdaQueryWrapper
);
Page
<
ImRtcRecord
>
page
=
this
.
page
(
pageParam
,
rtcRecordLambdaQueryWrapper
);
return
page
;
return
page
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment