package com.aidex.common.app.server.impl;

import com.aidex.common.app.server.IAppService;
import com.aidex.common.gps.common.GeneratorGspApi;
import com.aidex.system.domain.SysNotice;
import com.aidex.system.domain.SysShip;
import com.aidex.system.service.SysNoticeService;
import com.aidex.system.service.SysShipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AppService implements IAppService {

    @Autowired
    private SysNoticeService sysNoticeService;


    public List<SysNotice> getCarouselList(){

        List<SysNotice> carouselList = sysNoticeService.findList(new SysNotice(){{setCarousel("1");}});
        return carouselList;
    }

    public List<SysNotice> getNoticeList(){
        List<SysNotice> noticeList = sysNoticeService.findList(new SysNotice(){{setCarousel("0");setNoticeType("1");}});
        return noticeList;
    }

    public SysNotice findCarouselAndNoticeDetails(String id){
        return sysNoticeService.get(id);
    }
}
