You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.7 KiB
64 lines
1.7 KiB
package com.service.impl;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
import java.util.Map;
|
|
import java.util.List;
|
|
|
|
import com.baomidou.mybatisplus.mapper.Wrapper;
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
|
import com.baomidou.mybatisplus.plugins.Page;
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
import com.utils.PageUtils;
|
|
import com.utils.Query;
|
|
|
|
|
|
import com.dao.ChatDao;
|
|
import com.entity.ChatEntity;
|
|
import com.service.ChatService;
|
|
import com.entity.vo.ChatVO;
|
|
import com.entity.view.ChatView;
|
|
|
|
@Service("chatService")
|
|
public class ChatServiceImpl extends ServiceImpl<ChatDao, ChatEntity> implements ChatService {
|
|
|
|
|
|
@Override
|
|
public PageUtils queryPage(Map<String, Object> params) {
|
|
Page<ChatEntity> page = this.selectPage(
|
|
new Query<ChatEntity>(params).getPage(),
|
|
new EntityWrapper<ChatEntity>()
|
|
);
|
|
return new PageUtils(page);
|
|
}
|
|
|
|
@Override
|
|
public PageUtils queryPage(Map<String, Object> params, Wrapper<ChatEntity> wrapper) {
|
|
Page<ChatView> page =new Query<ChatView>(params).getPage();
|
|
page.setRecords(baseMapper.selectListView(page,wrapper));
|
|
PageUtils pageUtil = new PageUtils(page);
|
|
return pageUtil;
|
|
}
|
|
|
|
@Override
|
|
public List<ChatVO> selectListVO(Wrapper<ChatEntity> wrapper) {
|
|
return baseMapper.selectListVO(wrapper);
|
|
}
|
|
|
|
@Override
|
|
public ChatVO selectVO(Wrapper<ChatEntity> wrapper) {
|
|
return baseMapper.selectVO(wrapper);
|
|
}
|
|
|
|
@Override
|
|
public List<ChatView> selectListView(Wrapper<ChatEntity> wrapper) {
|
|
return baseMapper.selectListView(wrapper);
|
|
}
|
|
|
|
@Override
|
|
public ChatView selectView(Wrapper<ChatEntity> wrapper) {
|
|
return baseMapper.selectView(wrapper);
|
|
}
|
|
|
|
|
|
}
|