From 3f481005be717250a2ea87ff9367aa84d6a3eb13 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期六, 14 九月 2024 10:55:52 +0800
Subject: [PATCH] 课程代码

---
 xinquan-modules/xinquan-system/src/main/java/com/xinquan/system/service/impl/BannerServiceImpl.java |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/xinquan-modules/xinquan-system/src/main/java/com/xinquan/system/service/impl/BannerServiceImpl.java b/xinquan-modules/xinquan-system/src/main/java/com/xinquan/system/service/impl/BannerServiceImpl.java
index a537def..d32f4bc 100644
--- a/xinquan-modules/xinquan-system/src/main/java/com/xinquan/system/service/impl/BannerServiceImpl.java
+++ b/xinquan-modules/xinquan-system/src/main/java/com/xinquan/system/service/impl/BannerServiceImpl.java
@@ -1,9 +1,12 @@
 package com.xinquan.system.service.impl;
 
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.xinquan.common.core.utils.page.BeanUtils;
+import com.xinquan.system.api.domain.vo.BannerVO;
 import com.xinquan.system.domain.Banner;
 import com.xinquan.system.mapper.BannerMapper;
 import com.xinquan.system.service.BannerService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import java.util.List;
 import org.springframework.stereotype.Service;
 
 /**
@@ -17,4 +20,14 @@
 @Service
 public class BannerServiceImpl extends ServiceImpl<BannerMapper, Banner> implements BannerService {
 
+    /**
+     * 获取轮播图列表
+     *
+     * @return 轮播图列表
+     */
+    @Override
+    public List<BannerVO> getBannerList() {
+        List<Banner> list = this.lambdaQuery().orderByDesc(Banner::getSortNum).list();
+        return BeanUtils.copyList(list, BannerVO.class);
+    }
 }

--
Gitblit v1.7.1