|
@@ -2,6 +2,7 @@ package com.ruoyi.app.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.ruoyi.app.domain.*;
|
|
|
+import com.ruoyi.app.family.album.domain.TbFamilyAlbum;
|
|
|
import com.ruoyi.app.service.ITbEventsImgService;
|
|
|
import com.ruoyi.app.service.ITbFamilyService;
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
@@ -25,13 +26,23 @@ public class TbFamilyEventsServiceImpl extends ServiceImpl<TbFamilyEventsMapper,
|
|
|
|
|
|
@Autowired
|
|
|
private ITbEventsImgService eventsImgService;
|
|
|
+ @Autowired
|
|
|
+ private ITbFamilyService familyService;
|
|
|
|
|
|
|
|
|
@Override
|
|
|
public List<TbFamilyEvents> queryList(TbFamilyEvents events) {
|
|
|
LambdaQueryWrapper<TbFamilyEvents> lqw = new LambdaQueryWrapper<TbFamilyEvents>().eq(TbFamilyEvents::getFamilyId, events.getFamilyId());
|
|
|
+ if (StringUtils.isNotBlank(events.getTitle())){
|
|
|
+ lqw.like(TbFamilyEvents::getTitle ,events.getTitle());
|
|
|
+ }
|
|
|
List<TbFamilyEvents> list = this.list(lqw);
|
|
|
if (list.size() > 0) {
|
|
|
+ list.forEach(item->{
|
|
|
+ TbFamily family = familyService.getById(item.getFamilyId());
|
|
|
+ item.setFamily(family);
|
|
|
+ });
|
|
|
+
|
|
|
list.forEach(item -> {
|
|
|
List<TbEventsImg> imgList = eventsImgService.list(new LambdaQueryWrapper<TbEventsImg>().eq(TbEventsImg::getEventsId, item.getId()));
|
|
|
item.setImgList(imgList);
|