package com.ruoyi.system.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.system.domain.TIndexMenu; import com.ruoyi.system.domain.TTitleMajor; import com.ruoyi.system.dto.AllertTitleDto; import com.ruoyi.system.mapper.TIndexMenuMapper; import com.ruoyi.system.mapper.TTitleMajorMapper; import com.ruoyi.system.service.TIndexMenuService; import com.ruoyi.system.service.TTitleMajorService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.time.LocalDate; import java.util.*; import java.util.stream.Collectors; /** *

* 首页订单设置 服务实现类 *

* * @author luodangjia * @since 2024-09-19 */ @Service public class TIndexMenuServiceImpl extends ServiceImpl implements TIndexMenuService { @Autowired private TTitleMajorMapper titleMajorMapper; @Override public List allert(List cityCode) { List allert = new ArrayList<>(); List strings = new ArrayList<>(); for (String s : cityCode) { strings.add(s); } List allert1 = this.baseMapper.allert(strings); allert.addAll(allert1); allert = allert.stream().distinct().collect(Collectors.toList()); List tTitleMajorList = titleMajorMapper.selectList(new LambdaQueryWrapper()); for (AllertTitleDto allertTitleDto : allert) { List tTitleMajors = tTitleMajorList.stream().filter(e -> e.getTechnicalId().equals(allertTitleDto.getId())).collect(Collectors.toList()); allertTitleDto.setChildren(tTitleMajors); } return allert; } @Override public List> userUp() { return this.baseMapper.userUp(); } @Override public List> dayCount(Integer paymentStatus) { return this.baseMapper.dayCount(paymentStatus); } @Override public List> weekCount(Integer paymentStatus) { return this.baseMapper.weekCount(paymentStatus); } @Override public List> monthCount(Integer paymentStatus) { return this.baseMapper.monthCount(paymentStatus); } @Override public List> yearCount(Integer paymentStatus) { return this.baseMapper.yearCount(paymentStatus); } @Override public List> searchDayCount(LocalDate startDate, LocalDate endDate,Integer paymentStatus) { return this.baseMapper.searchDayCount(startDate,endDate,paymentStatus); } @Override public List> count1(LocalDate startDate, LocalDate endDate, Integer paymentStatus,Integer dayType) { return this.baseMapper.count1(startDate,endDate,paymentStatus,dayType); } }