zqy
4 天以前 77088e55cec8b6f83f8396d6609ff4f57b4807b5
zhang-content/src/main/java/com/ruoyi/service/impl/PeopleSearchServiceImpl.java
@@ -7,7 +7,7 @@
import com.ruoyi.domain.ZfEvent;
import com.ruoyi.domain.dto.zfEventdto;
import com.ruoyi.domain.peopleSea;
import com.ruoyi.domain.PeopleSea;
import com.ruoyi.service.PeopleSearchService;
import com.ruoyi.service.ZfEventService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -24,7 +24,7 @@
    private ZfEventService zfEventService;
    private LambdaQueryWrapper<peopleSea> buildCondition(peopleSea peops) {
    private LambdaQueryWrapper<PeopleSea> buildCondition(PeopleSea peops) {
        return null;
//        if(peops.getModule().equals("事纪")) {
@@ -44,14 +44,19 @@
    @Override
    public AjaxResult selectDataList(peopleSea peopleS, Integer pageNum, Integer pageSize) {
    public AjaxResult selectDataList(PeopleSea peopleS, Integer pageNum, Integer pageSize) {
        System.out.println(peopleS.getModules().toString());
        for(String thi: peopleS.getModules()) {
            System.out.println("dsf4444");
            HashMap<String, Object> data = new HashMap<>();
            if (thi.equals("事纪")) {
                LambdaQueryWrapper<ZfEvent> lqw = new LambdaQueryWrapper<>();
                ;
                //按照,分割名称
                String[] pes = peopleS.getPeoples().split(",");
                // 后续条件用and连接
                for (String pe : pes) {
@@ -62,16 +67,19 @@
                {
                    lqw.isNotNull(ZfEvent::getUrl);
                }
                if(peopleS.getHasAttachment().equals("是"))
                {
                    lqw.isNotNull(ZfEvent::getUrl);
                }
                Page<ZfEvent> zfEventPage = new Page<>(pageNum, pageSize);
                Page<ZfEvent> pageResult = zfEventService.page(zfEventPage, lqw);
                List<ZfEvent> beanRecords = pageResult.getRecords();//得到查询出来的数据
                System.out.println(beanRecords);
                System.out.println(beanRecords.size());
                List<zfEventdto> dtoResult = encapData(beanRecords, "事纪");
                System.out.println(dtoResult);
                data = MapUtils.getResult(pageResult, dtoResult);
                System.out.println(data);
            }
            //合并多个data