package com.ruoyi.service.impl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.utils.MapUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.domain.ZfLog;
|
import com.ruoyi.domain.dto.AncestorClan;
|
import com.ruoyi.mapper.ZfLogMapper;
|
import com.ruoyi.service.ZfLogService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import java.time.LocalDateTime;
|
import java.util.HashMap;
|
import java.util.List;
|
|
/**
|
* <p>
|
* 服务实现类
|
* </p>
|
*
|
* @author ojq
|
* @since 2023-09-06
|
*/
|
@Service
|
public class ZfLogServiceImpl extends ServiceImpl<ZfLogMapper, ZfLog> implements ZfLogService {
|
|
@Autowired
|
private ZfLogMapper zfLogMapper;
|
@Override
|
public AjaxResult selectDataList(LocalDateTime ldt, Integer pageNo, Integer pageSize) {
|
|
|
|
// QueryWrapper<Object> queryWrapper = new QueryWrapper<>();
|
//
|
//
|
// LambdaQueryWrapper<ZfLog> lqw = new LambdaQueryWrapper<>();
|
//
|
// lqw.eq(ldt != null, ZfLog::getUpdateTime, ldt);
|
Page<ZfLog> zfCleanPage = new Page<>(pageNo, pageSize);
|
// Page<ZfLog> pageResult = zfLogService.page(zfCleanPage, lqw);
|
//
|
// queryWrapper.eq(zfAncestor.getClanId() !=null , " zf_ancestor.clan_id", zfAncestor.getClanId());
|
// queryWrapper.eq(zfAncestor.getSysId() !=null , " zf_ancestor.sys_id ", zfAncestor.getSysId());
|
// queryWrapper.like(StringUtils.isNotEmpty(zfAncestor.getName()),"zf_ancestor.name",zfAncestor.getName());
|
|
Page<ZfLog> info = zfLogMapper.selectAllInfo(new Page<>(pageNo, pageSize),ldt);
|
//page(pa, wrapper);
|
// List<AncestorClan> orders = page(pa, wrapper);
|
List<ZfLog> list =info.getRecords();
|
HashMap<String, Object> data = MapUtils.getResult(info, list);
|
return AjaxResult.success(data);
|
// return null;
|
}
|
}
|