Merge branch 'master' of https://gitee.com/rowger_217/im-system
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package com.lld.im.service.call.controller;
|
package com.lld.im.service.call.controller;
|
||||||
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.lld.im.common.ResponseVO;
|
import com.lld.im.common.ResponseVO;
|
||||||
@@ -9,10 +9,9 @@ import com.lld.im.service.call.dao.ImCallHistoryEntity;
|
|||||||
import com.lld.im.service.call.dao.mapper.ImCallHistoryMapper;
|
import com.lld.im.service.call.dao.mapper.ImCallHistoryMapper;
|
||||||
import com.lld.im.service.call.model.HistoryListReq;
|
import com.lld.im.service.call.model.HistoryListReq;
|
||||||
import com.lld.im.service.call.service.ImCallHistoryService;
|
import com.lld.im.service.call.service.ImCallHistoryService;
|
||||||
import com.lld.im.service.message.service.P2PMessageService;
|
|
||||||
import com.lld.im.service.user.dao.ImUserDataEntity;
|
import com.lld.im.service.user.dao.ImUserDataEntity;
|
||||||
import com.lld.im.service.user.service.ImUserService;
|
import com.lld.im.service.user.service.ImUserService;
|
||||||
import com.lld.im.service.utils.SnowflakeIdWorker;
|
import com.lld.im.service.utils.StringUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
@@ -39,15 +38,16 @@ public class ImCallHistoryController {
|
|||||||
|
|
||||||
@PostMapping("/queryList")
|
@PostMapping("/queryList")
|
||||||
public ResponseVO queryList(@RequestBody HistoryListReq req) {
|
public ResponseVO queryList(@RequestBody HistoryListReq req) {
|
||||||
|
|
||||||
if(req.getLimit()!=null){
|
if(req.getLimit()!=null){
|
||||||
Page<ImCallHistoryEntity> objectPage = new Page<>(req.getOffset(),req.getLimit());
|
Page<ImCallHistoryEntity> objectPage = new Page<>(req.getOffset(),req.getLimit());
|
||||||
QueryWrapper<ImCallHistoryEntity> query=new QueryWrapper<>();
|
LambdaQueryWrapper<ImCallHistoryEntity> query=new LambdaQueryWrapper<>();
|
||||||
// query.eq("invite_id",req.getUid());
|
query.orderByDesc(ImCallHistoryEntity::getCreateTime)
|
||||||
query.orderByDesc("create_time");
|
.and(StringUtils.isNotEmpty(req.getUid()),
|
||||||
IPage<ImCallHistoryEntity> imCallHistoryEntityIPage=callHistoryMapper.selectPage(objectPage,query);
|
x -> x.eq(ImCallHistoryEntity::getInviteId,req.getUid()).or().eq(ImCallHistoryEntity::getPassiveId,req.getUid()))
|
||||||
|
.between(req.getStartTime() != null && req.getEndTime() != null,
|
||||||
|
ImCallHistoryEntity::getCreateTime,req.getStartTime(),req.getEndTime());
|
||||||
|
|
||||||
|
IPage<ImCallHistoryEntity> imCallHistoryEntityIPage = callHistoryMapper.selectPage(objectPage,query);
|
||||||
return ResponseVO.successResponse(imCallHistoryEntityIPage);
|
return ResponseVO.successResponse(imCallHistoryEntityIPage);
|
||||||
}else {
|
}else {
|
||||||
return ResponseVO.errorResponse();
|
return ResponseVO.errorResponse();
|
||||||
|
|||||||
Reference in New Issue
Block a user