package com.bonus.canteen.core.kitchen.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bonus.canteen.core.kitchen.domain.KitchenDeviceInfo;
import com.bonus.canteen.core.kitchen.dto.IndexHomePageDTO;
import com.bonus.canteen.core.kitchen.dto.KitchenDeviceListDTO;
import com.bonus.canteen.core.kitchen.mapper.KitchenDeviceInfoMapper;
import com.bonus.canteen.core.kitchen.mapper.KitchenHomePageMapper;
import com.bonus.canteen.core.kitchen.service.IKitchenDeviceInfoService;
import com.bonus.canteen.core.kitchen.service.IKitchenHomePageService;
import com.bonus.canteen.core.kitchen.vo.IndexHomePageInformationVO;
import com.bonus.canteen.core.kitchen.vo.KitchenDeviceListVO;
import com.bonus.common.core.exception.ServiceException;
import com.bonus.common.core.utils.DateUtils;
import com.bonus.common.houqin.constant.DelFlagEnum;
import org.hibernate.validator.internal.util.StringHelper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.IOException;
import java.net.InetAddress;
import java.util.List;

/**
 * 厨房设备基础信息Service业务层处理
 *
 * @author xsheng
 * @date 2025-06-16
 */
@Service
public class KitchenHomePageerviceImpl implements IKitchenHomePageService {
    @Resource
    private KitchenHomePageMapper kitchenHomePageMapper;

    @Resource
    private KitchenDeviceInfoMapper kitchenDeviceInfoMapper;


    @Override
    public IndexHomePageInformationVO getIndexHomePageInformation(IndexHomePageDTO indexHomePageDTO) {
       Long deviceInfoCount = kitchenDeviceInfoMapper.selectCount(
                Wrappers.<KitchenDeviceInfo>lambdaQuery()
                        .eq(KitchenDeviceInfo::getDelFlag, DelFlagEnum.DEL_FALSE.key())
        );

        System.err.println("设备总数: " + deviceInfoCount);
        return null;
    }
}
