package com.backendsys.modules.cms.siteinfo.service.impl;

import com.backendsys.modules.cms.siteinfo.dao.SiteInfoDao;
import com.backendsys.modules.cms.siteinfo.entity.SiteInfo;
import com.backendsys.modules.cms.siteinfo.service.SiteInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class SiteInfoServiceImpl implements SiteInfoService {

    @Autowired
    private SiteInfoDao siteInfoDao;

    /**
     * 获取站点信息
     */
    @Override
    public SiteInfo selectSiteInfo() {
        return siteInfoDao.selectById(1L);
    }

    /**
     * 编辑站点信息
     */
    @Override
    public Map<String, Object> updateSiteInfo(SiteInfo siteInfo) {
        siteInfoDao.updateById(siteInfo);
        return Map.of("id", siteInfo.getId());
    }

}
