From 92e2be60c2d92ab5c8524c76f97712cd9f66502d Mon Sep 17 00:00:00 2001 From: nickchange <126672920+nickchange@users.noreply.github.com> Date: 星期三, 18 十月 2023 11:44:35 +0800 Subject: [PATCH] 10.18.1 --- cloud-server-other/src/main/java/com/dsh/other/service/impl/BannerServiceImpl.java | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/cloud-server-other/src/main/java/com/dsh/other/service/impl/BannerServiceImpl.java b/cloud-server-other/src/main/java/com/dsh/other/service/impl/BannerServiceImpl.java index d8ecc6a..376f464 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/service/impl/BannerServiceImpl.java +++ b/cloud-server-other/src/main/java/com/dsh/other/service/impl/BannerServiceImpl.java @@ -2,10 +2,13 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.dsh.other.entity.Banner; +import com.dsh.other.feignclient.model.AdvertisementChangeStateDTO; +import com.dsh.other.feignclient.model.AdvertisementQuery; import com.dsh.other.entity.CreateHistoryDto; import com.dsh.other.entity.GetHistoryDto; import com.dsh.other.mapper.BannerMapper; import com.dsh.other.service.IBannerService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @@ -25,4 +28,19 @@ public List<GetHistoryDto> gethistory(Integer studentId) { return baseMapper.getHistory(studentId); } + @Autowired + private BannerMapper bannerMapper; + @Override + public int changeState(AdvertisementChangeStateDTO dto) { + List<Integer> ids = dto.getIds(); + Integer state = dto.getState(); + return bannerMapper.changeState(ids,state); + } + + @Override + public List<Banner> listAll(AdvertisementQuery query) { + return bannerMapper.listAll(query); + } + + } -- Gitblit v1.7.1