From 5be07b1a021f596b003eac001f4cb77416ae6c7b Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 11 十二月 2024 17:08:47 +0800
Subject: [PATCH] 修改

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TIndexMenuServiceImpl.java |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TIndexMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TIndexMenuServiceImpl.java
index 90fea1f..335afec 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TIndexMenuServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TIndexMenuServiceImpl.java
@@ -1,11 +1,16 @@
 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;
@@ -24,9 +29,18 @@
 @Service
 public class TIndexMenuServiceImpl extends ServiceImpl<TIndexMenuMapper, TIndexMenu> implements TIndexMenuService {
 
+    @Autowired
+    private TTitleMajorMapper titleMajorMapper;
+
     @Override
     public List<AllertTitleDto> allert(List<String> cityCode) {
-        return this.baseMapper.allert(cityCode);
+        List<AllertTitleDto> allert = this.baseMapper.allert(cityCode);
+        for (AllertTitleDto allertTitleDto : allert) {
+            List<TTitleMajor> tTitleMajors = titleMajorMapper.selectList(Wrappers.lambdaQuery(TTitleMajor.class)
+                    .eq(TTitleMajor::getTechnicalId, allertTitleDto.getId()));
+            allertTitleDto.setChildren(tTitleMajors);
+        }
+        return allert;
     }
 
     @Override

--
Gitblit v1.7.1