package com.yami.shop.service.impl;

import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
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.yami.shop.bean.dto.ShopCategoryExcelDTO;
import com.yami.shop.bean.model.*;
import com.yami.shop.bean.param.CategoryProductDTO;
import com.yami.shop.bean.vo.ShopCategoryLogVO;
import com.yami.shop.common.exception.GlobalException;
import com.yami.shop.dao.*;
import com.yami.shop.service.IShopCategoryLogService;
import com.yami.shop.service.IShopCategoryService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.InputStream;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 门店前台类目服务实现类
 *
 * @author YourName
 * @since 2025-09-XX
 */
@Slf4j
@Service
@AllArgsConstructor
public class ShopCategoryLogServiceImpl extends ServiceImpl<ShopCategoryLogMapper, ShopCategoryLog> implements IShopCategoryLogService {

    private final ShopCategoryLogMapper shopCategoryLogMapper;

    @Override
    public List<ShopCategoryLogVO> groupByCode(ShopCategoryLog shopCategoryLog) {
        return shopCategoryLogMapper.groupByCode(shopCategoryLog);
    }
}
