2021与蓝度共同重构项目,服务端
zhanzhiqin
2022-03-04 f233ba26bbf8703fcc4e86a5dbb9d6026f91e7d6
ximon-admin/src/main/java/com/sandu/ximon/admin/service/BannerService.java
@@ -26,13 +26,13 @@
    private final Snowflake snowflake;
    /**
     * 获取banner跳转列表
     */
    public List<BannerPositionDto> listPosition() {
        return ListUtil.of(new BannerPositionDto("首页1", 0), new BannerPositionDto("首页2", 1),
                new BannerPositionDto("首页3", 2), new BannerPositionDto("首页4", 3));
    }
//    /**
//     * 获取banner跳转列表
//     */
//    public List<BannerPositionDto> listPosition() {
//        return ListUtil.of(new BannerPositionDto("首页1", 0), new BannerPositionDto("首页2", 1),
//                new BannerPositionDto("首页3", 2), new BannerPositionDto("首页4", 3));
//    }
    /**
     * 添加banner
@@ -42,7 +42,7 @@
        banner.setId(snowflake.nextId());
        banner.setBannerUrl(ResUtils.removePrefix(bannerParam.getUrl()));
        banner.setAuthor(SecurityUtils.getUsername());
        banner.setPosition(bannerParam.getPosition());
        banner.setBindingAuthor(bannerParam.getBinding_author());
        return save(banner);
    }
@@ -59,16 +59,15 @@
            throw new BusinessException("找不到banner");
        }
        Banner update = new Banner();
       // BeanUtils.copyProperties(bannerParam, update);
        // BeanUtils.copyProperties(bannerParam, update);
        update.setId(bannerId);
        update.setPosition(bannerParam.getPosition());
        update.setBannerUrl(bannerParam.getUrl());
        update.setId(bannerId);
        return updateById(update);
    }
    /**
     * 删除banner
     *
     * @param bannerId
     * @return
     */
@@ -82,6 +81,7 @@
    /**
     * 查询banner
     *
     * @return
     */
    public List<Banner> listBanner() {