|
@@ -1,23 +1,27 @@
|
|
|
package org.jeecg.modules.app.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import org.jeecg.modules.app.entity.AppBanner;
|
|
|
import org.jeecg.modules.app.mapper.AppBannerMapper;
|
|
|
import org.jeecg.modules.app.service.IAppHomeService;
|
|
|
import org.jeecg.modules.app.vo.AppBannerVO;
|
|
|
+import org.jeecg.modules.app.vo.CoureseVO;
|
|
|
import org.jeecg.modules.app.vo.HomeVO;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.util.List;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
-public class AppHomeServiceImpl extends ServiceImpl<AppBannerMapper, AppBanner> implements IAppHomeService {
|
|
|
+public class AppHomeServiceImpl implements IAppHomeService {
|
|
|
+ @Resource
|
|
|
+ private AppBannerMapper appBannerMapper;
|
|
|
@Override
|
|
|
public HomeVO homeInfo(){
|
|
|
- List<AppBanner> appBanners = this.getBaseMapper().selectList(Wrappers.<AppBanner>lambdaQuery()
|
|
|
+ List<AppBanner> appBanners = appBannerMapper.selectList(Wrappers.<AppBanner>lambdaQuery()
|
|
|
.eq(AppBanner::getDelFlag, 0));
|
|
|
+ CoureseVO courseVO = new CoureseVO();
|
|
|
return new HomeVO().setBannerList(appBanners.stream()
|
|
|
.map(banner -> new AppBannerVO()
|
|
|
.setId(banner.getId())
|