|
|
@@ -3,13 +3,17 @@ package com.zsElectric.boot.business.service.impl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.zsElectric.boot.business.mapper.BannerInfoMapper;
|
|
|
import com.zsElectric.boot.business.mapper.ThirdPartyStationInfoMapper;
|
|
|
import com.zsElectric.boot.business.mapper.UserFirmMapper;
|
|
|
+import com.zsElectric.boot.business.model.entity.BannerInfo;
|
|
|
import com.zsElectric.boot.business.model.entity.UserFirm;
|
|
|
import com.zsElectric.boot.business.model.query.StationInfoQuery;
|
|
|
+import com.zsElectric.boot.business.model.vo.BannerInfoVO;
|
|
|
import com.zsElectric.boot.business.model.vo.StationInfoMapVO;
|
|
|
import com.zsElectric.boot.business.model.vo.StationInfoVO;
|
|
|
import com.zsElectric.boot.business.service.AppletHomeService;
|
|
|
+import com.zsElectric.boot.business.converter.BannerInfoConverter;
|
|
|
import com.zsElectric.boot.security.util.SecurityUtils;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -18,6 +22,7 @@ import org.springframework.stereotype.Service;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.time.LocalTime;
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
+import java.util.List;
|
|
|
|
|
|
@Slf4j
|
|
|
@Service
|
|
|
@@ -26,6 +31,8 @@ public class AppletHomeServiceImpl implements AppletHomeService {
|
|
|
|
|
|
private final ThirdPartyStationInfoMapper thirdPartyStationInfoMapper;
|
|
|
private final UserFirmMapper userFirmMapper;
|
|
|
+ private final BannerInfoMapper bannerInfoMapper;
|
|
|
+ private final BannerInfoConverter bannerInfoConverter;
|
|
|
|
|
|
/**
|
|
|
* 时间格式化器 HHmmss
|
|
|
@@ -78,4 +85,15 @@ public class AppletHomeServiceImpl implements AppletHomeService {
|
|
|
longitude, latitude, currentTime, null
|
|
|
);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<BannerInfoVO> getBannerList() {
|
|
|
+ // 查询启用状态的Banner,按排序字段降序
|
|
|
+ List<BannerInfo> bannerList = bannerInfoMapper.selectList(
|
|
|
+ new LambdaQueryWrapper<BannerInfo>()
|
|
|
+ .eq(BannerInfo::getStatus, 1)
|
|
|
+ .orderByDesc(BannerInfo::getSort)
|
|
|
+ );
|
|
|
+ return bannerInfoConverter.toVO(bannerList);
|
|
|
+ }
|
|
|
}
|