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
87421ae2
Commit
87421ae2
authored
Jun 05, 2022
by
Future
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xiaohudou_20220427' into feature-cluster
parents
d4a0bacc
503acccc
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
14 deletions
+31
-14
core/src/main/java/com/wecloud/im/controller/ImRtcRecordController.java
+5
-5
core/src/main/java/com/wecloud/im/param/rtc/SingleRtcRecordParam.java
+8
-0
core/src/main/java/com/wecloud/im/service/impl/ImRtcRecordServiceImpl.java
+15
-6
im-sdk/src/main/java/com/wecloud/im/sdk/ResourcePathConstants.java
+1
-1
im-sdk/src/main/java/com/wecloud/im/sdk/internal/WecloudImRtcRecordOperation.java
+2
-2
No files found.
core/src/main/java/com/wecloud/im/controller/ImRtcRecordController.java
View file @
87421ae2
...
...
@@ -23,17 +23,17 @@ import org.springframework.web.bind.annotation.RestController;
*/
@Slf4j
@RestController
@RequestMapping
(
"/rtc
r
ecord"
)
@Api
(
value
=
"
后台通话记录列表
"
)
@RequestMapping
(
"/rtc
R
ecord"
)
@Api
(
value
=
"
通话记录控制器
"
)
public
class
ImRtcRecordController
extends
BaseController
{
@Autowired
private
ImRtcRecordService
rtcRecordService
;
@PostMapping
(
"/listRtcRecords"
)
@ApiOperation
(
value
=
"分页获取
后台
通话记录"
)
public
ApiResult
<
Page
<
ImRtcRecord
>>
listRtcRecords
(
@RequestBody
SingleRtcRecordParam
singleRtcRecordParam
){
log
.
info
(
"
获取后台
通话记录入参 {}"
,
JSON
.
toJSONString
(
singleRtcRecordParam
));
@ApiOperation
(
value
=
"分页获取通话记录"
)
public
ApiResult
<
Page
<
ImRtcRecord
>>
listRtcRecords
(
@RequestBody
SingleRtcRecordParam
singleRtcRecordParam
)
{
log
.
info
(
"
分页获取
通话记录入参 {}"
,
JSON
.
toJSONString
(
singleRtcRecordParam
));
return
ApiResult
.
ok
(
rtcRecordService
.
getPageImRtcRecords
(
singleRtcRecordParam
));
}
...
...
core/src/main/java/com/wecloud/im/param/rtc/SingleRtcRecordParam.java
View file @
87421ae2
...
...
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author nanqianhao
...
...
@@ -53,4 +54,11 @@ public class SingleRtcRecordParam implements Serializable {
*/
@ApiModelProperty
(
"每页数量"
)
private
Integer
pageSize
;
@ApiModelProperty
(
"开始时间"
)
private
Date
createTimeStart
;
@ApiModelProperty
(
"结束时间"
)
private
Date
createTimeEnd
;
}
core/src/main/java/com/wecloud/im/service/impl/ImRtcRecordServiceImpl.java
View file @
87421ae2
...
...
@@ -14,6 +14,7 @@ import com.wecloud.im.sdk.enums.SingleRtcOperateTypeEnum;
import
com.wecloud.im.service.ImClientService
;
import
com.wecloud.im.service.ImRtcRecordService
;
import
com.wecloud.utils.SnowflakeUtil
;
import
io.geekidea.springbootplus.framework.common.exception.BusinessException
;
import
io.geekidea.springbootplus.framework.common.service.impl.BaseServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.scheduling.annotation.Async
;
...
...
@@ -93,16 +94,24 @@ public class ImRtcRecordServiceImpl extends BaseServiceImpl<ImRtcRecordMapper, I
}
@Override
public
Page
<
ImRtcRecord
>
getPageImRtcRecords
(
SingleRtcRecordParam
singleRtcRecordParam
)
{
public
Page
<
ImRtcRecord
>
getPageImRtcRecords
(
SingleRtcRecordParam
param
)
{
if
(
param
.
getPageNum
()
==
null
)
{
throw
new
BusinessException
(
"页码不可为空"
);
}
if
(
param
.
getPageSize
()
==
null
)
{
throw
new
BusinessException
(
"每页数量不可为空"
);
}
ImClient
imClient
=
imClientService
.
getCurrentClient
();
LambdaQueryWrapper
<
ImRtcRecord
>
rtcRecordLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
rtcRecordLambdaQueryWrapper
.
eq
(
ImRtcRecord:
:
getFkAppid
,
imClient
.
getFkAppid
());
rtcRecordLambdaQueryWrapper
.
eq
(
singleRtcRecordParam
.
getFromClientId
()!=
null
,
ImRtcRecord:
:
getFromClientId
,
singleRtcRecordParam
.
getFromClientId
());
rtcRecordLambdaQueryWrapper
.
eq
(
singleRtcRecordParam
.
getToClientId
()!=
null
,
ImRtcRecord:
:
getToClientId
,
singleRtcRecordParam
.
getToClientId
());
rtcRecordLambdaQueryWrapper
.
eq
(
singleRtcRecordParam
.
getChannelId
()!=
null
,
ImRtcRecord:
:
getChannelId
,
singleRtcRecordParam
.
getChannelId
());
rtcRecordLambdaQueryWrapper
.
eq
(
singleRtcRecordParam
.
getCallType
()!=
null
,
ImRtcRecord:
:
getCallType
,
singleRtcRecordParam
.
getCallType
());
rtcRecordLambdaQueryWrapper
.
eq
(
param
.
getFromClientId
()
!=
null
,
ImRtcRecord:
:
getFromClientId
,
param
.
getFromClientId
());
rtcRecordLambdaQueryWrapper
.
eq
(
param
.
getToClientId
()
!=
null
,
ImRtcRecord:
:
getToClientId
,
param
.
getToClientId
());
rtcRecordLambdaQueryWrapper
.
eq
(
param
.
getChannelId
()
!=
null
,
ImRtcRecord:
:
getChannelId
,
param
.
getChannelId
());
rtcRecordLambdaQueryWrapper
.
eq
(
param
.
getCallType
()
!=
null
,
ImRtcRecord:
:
getCallType
,
param
.
getCallType
());
rtcRecordLambdaQueryWrapper
.
lt
(
param
.
getCreateTimeEnd
()
!=
null
,
ImRtcRecord:
:
getCreateTime
,
param
.
getCreateTimeEnd
());
rtcRecordLambdaQueryWrapper
.
gt
(
param
.
getCreateTimeStart
()
!=
null
,
ImRtcRecord:
:
getCreateTime
,
param
.
getCreateTimeStart
());
rtcRecordLambdaQueryWrapper
.
orderByDesc
(
ImRtcRecord:
:
getCreateTime
);
Page
<
ImRtcRecord
>
pageParam
=
new
Page
<>(
singleRtcRecordParam
.
getPageNum
(),
singleRtcRecordP
aram
.
getPageSize
());
Page
<
ImRtcRecord
>
pageParam
=
new
Page
<>(
param
.
getPageNum
(),
p
aram
.
getPageSize
());
Page
<
ImRtcRecord
>
page
=
this
.
page
(
pageParam
,
rtcRecordLambdaQueryWrapper
);
return
page
;
}
...
...
im-sdk/src/main/java/com/wecloud/im/sdk/ResourcePathConstants.java
View file @
87421ae2
...
...
@@ -169,7 +169,7 @@ public class ResourcePathConstants {
/**
* 获取通话记录请求
*/
public
static
final
String
LIST_RTC
RECORDS_REQUEST
=
"/api/rtcr
ecord/listRtcRecords"
;
public
static
final
String
LIST_RTC
_RECORDS_REQUEST
=
"/api/rtcR
ecord/listRtcRecords"
;
/**
* 单次发布
...
...
im-sdk/src/main/java/com/wecloud/im/sdk/internal/WecloudImRtcRecordOperation.java
View file @
87421ae2
...
...
@@ -12,7 +12,7 @@ import com.wecloud.im.sdk.model.ImRtcRecord;
import
com.wecloud.im.sdk.model.PageResult
;
import
com.wecloud.im.sdk.model.RtcRecordRequest
;
import
static
com
.
wecloud
.
im
.
sdk
.
ResourcePathConstants
.
LIST_RTCRECORDS_REQUEST
;
import
static
com
.
wecloud
.
im
.
sdk
.
ResourcePathConstants
.
LIST_RTC
_
RECORDS_REQUEST
;
/**
* @author nanqianhao
...
...
@@ -48,7 +48,7 @@ public class WecloudImRtcRecordOperation extends WecloudImOperation {
}
// 发送请求
RequestMessage
request
=
new
WecloudRequestMessageBuilder
().
setEndpoint
(
LIST_RTCRECORDS_REQUEST
)
RequestMessage
request
=
new
WecloudRequestMessageBuilder
().
setEndpoint
(
LIST_RTC
_
RECORDS_REQUEST
)
.
setMethod
(
HttpMethod
.
POST
).
setParameters
(
param
)
.
setOriginalRequest
(
rtcRecordRequest
).
build
();
...
...
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