package com.ruoyi.project.service.impl;
|
|
import java.util.List;
|
import com.ruoyi.common.utils.DateUtils;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import java.util.ArrayList;
|
import java.util.Map;
|
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.project.mapper.ServiceSystemmessageMapper;
|
import com.ruoyi.project.domain.ServiceSystemmessage;
|
import com.ruoyi.project.service.IServiceSystemmessageService;
|
|
/**
|
* 系统消息Service业务层处理
|
*
|
* @author ruoyi
|
* @date 2022-06-02
|
*/
|
@Service
|
public class ServiceSystemmessageServiceImpl extends ServiceImpl<ServiceSystemmessageMapper, ServiceSystemmessage> implements IServiceSystemmessageService
|
{
|
|
|
/**
|
* 查询系统消息列表
|
*
|
* @param serviceSystemmessage 系统消息
|
* @return 系统消息
|
*/
|
@Override
|
public List<ServiceSystemmessage> queryList(ServiceSystemmessage serviceSystemmessage) {
|
LambdaQueryWrapper<ServiceSystemmessage> wrappers = Wrappers.lambdaQuery();
|
wrappers.orderByDesc(ServiceSystemmessage::getId);
|
if (StringUtils.isNotBlank(serviceSystemmessage.getSenduserno())){
|
wrappers.eq(ServiceSystemmessage::getSenduserno ,serviceSystemmessage.getSenduserno());
|
}
|
if (StringUtils.isNotBlank(serviceSystemmessage.getSendusername())){
|
wrappers.like(ServiceSystemmessage::getSendusername ,serviceSystemmessage.getSendusername());
|
}
|
if (StringUtils.isNotBlank(serviceSystemmessage.getReceiveuserno())){
|
wrappers.eq(ServiceSystemmessage::getReceiveuserno ,serviceSystemmessage.getReceiveuserno());
|
}
|
if (StringUtils.isNotBlank(serviceSystemmessage.getReceiveusername())){
|
wrappers.like(ServiceSystemmessage::getReceiveusername ,serviceSystemmessage.getReceiveusername());
|
}
|
if (StringUtils.isNotBlank(serviceSystemmessage.getMessagecontent())){
|
wrappers.eq(ServiceSystemmessage::getMessagecontent ,serviceSystemmessage.getMessagecontent());
|
}
|
if (serviceSystemmessage.getMessagetype() != null){
|
wrappers.eq(ServiceSystemmessage::getMessagetype ,serviceSystemmessage.getMessagetype());
|
}
|
if (serviceSystemmessage.getIsread() != null){
|
wrappers.eq(ServiceSystemmessage::getIsread ,serviceSystemmessage.getIsread());
|
}
|
if (serviceSystemmessage.getReadtime() != null){
|
wrappers.eq(ServiceSystemmessage::getReadtime ,serviceSystemmessage.getReadtime());
|
}
|
if (StringUtils.isNotBlank(serviceSystemmessage.getApplytype())){
|
wrappers.eq(ServiceSystemmessage::getApplytype ,serviceSystemmessage.getApplytype());
|
}
|
if (serviceSystemmessage.getFundtype() != null){
|
wrappers.eq(ServiceSystemmessage::getFundtype ,serviceSystemmessage.getFundtype());
|
}
|
return this.list(wrappers);
|
}
|
|
}
|