package com.nailart.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nailart.dataobj.MainInfoDO;
import com.nailart.dataobj.PortfolioDO;
import com.nailart.enums.RespCodeEnum;
import com.nailart.mapper.MainInfoMapper;
import com.nailart.mapper.PortfolioMapper;
import com.nailart.service.MainInfoService;
import com.nailart.service.PortfolioService;
import com.nailart.utils.DateUtils;
import com.nailart.vo.RespVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * @Author: xiaowang
 * @Date: 2021/5/10 14:48
 */
@Service
public class MainInfoServiceImpl extends ServiceImpl<MainInfoMapper, MainInfoDO> implements MainInfoService {

    private final MainInfoMapper mainInfoMapper;
    private static final Logger logger = LoggerFactory.getLogger(MainInfoServiceImpl.class);

    public MainInfoServiceImpl(MainInfoMapper mainInfoMapper) {

        this.mainInfoMapper = mainInfoMapper;
    }


    @Override
    public MainInfoDO getMainInfo() {
        return mainInfoMapper.selectById(1);
    }

    @Override
    public Integer updateMainInfo(MainInfoDO mainInfoDO) {
        return mainInfoMapper.updateById(mainInfoDO);
    }
}
