liujie
2023-09-25 8c55ab2701c99cec16eff92a26fefdf77fcdd28f
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);
    }
}