xuhy
2024-12-11 0a1533fd30ec1a2f4624ccda4ff11f2535ea8a46
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package com.ruoyi.system.service.impl;
 
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.*;
 
/**
 * <p>
 * 首页订单设置 服务实现类
 * </p>
 *
 * @author luodangjia
 * @since 2024-09-19
 */
@Service
public class TIndexMenuServiceImpl extends ServiceImpl<TIndexMenuMapper, TIndexMenu> implements TIndexMenuService {
 
    @Autowired
    private TTitleMajorMapper titleMajorMapper;
 
    @Override
    public List<AllertTitleDto> allert(List<String> cityCode) {
        List<AllertTitleDto> allert = new ArrayList<>();
        for (String s : cityCode) {
            List<AllertTitleDto> allert1 = this.baseMapper.allert(Collections.singletonList(s));
            allert.addAll(allert1);
        }
        for (AllertTitleDto allertTitleDto : allert) {
            List<TTitleMajor> tTitleMajors = titleMajorMapper.selectList(Wrappers.lambdaQuery(TTitleMajor.class)
                    .eq(TTitleMajor::getTechnicalId, allertTitleDto.getId()));
            allertTitleDto.setChildren(tTitleMajors);
        }
        return allert;
    }
 
    @Override
    public List<Map<String, String>> userUp() {
        return this.baseMapper.userUp();
    }
 
    @Override
    public List<Map<String, String>> dayCount(Integer paymentStatus) {
        return this.baseMapper.dayCount(paymentStatus);
    }
 
    @Override
    public List<Map<String, String>> weekCount(Integer paymentStatus) {
        return this.baseMapper.weekCount(paymentStatus);
    }
 
    @Override
    public List<Map<String, String>> monthCount(Integer paymentStatus) {
        return this.baseMapper.monthCount(paymentStatus);
    }
 
    @Override
    public List<Map<String, String>> yearCount(Integer paymentStatus) {
        return this.baseMapper.yearCount(paymentStatus);
    }
 
    @Override
    public List<Map<String, String>> searchDayCount(LocalDate startDate, LocalDate endDate,Integer paymentStatus) {
        return this.baseMapper.searchDayCount(startDate,endDate,paymentStatus);
    }
 
    @Override
    public List<Map<String, String>> count1(LocalDate startDate, LocalDate endDate, Integer paymentStatus,Integer dayType) {
        return this.baseMapper.count1(startDate,endDate,paymentStatus,dayType);
    }
}