package com.cool.store.service.impl;

import com.cool.store.dao.PointInfoDAO;
import com.cool.store.dto.MiniShopDTO;
import com.cool.store.entity.PointInfoDO;
import com.cool.store.service.OpportunityPointService;
import com.cool.store.vo.point.MiniPointPageVO;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @Author: WangShuo
 * @Date: 2025/04/02/18:17
 * @Version 1.0
 * @注释:
 */
@Service
public class OpportunityPointServiceImpl implements OpportunityPointService {

    @Autowired
    private PointInfoDAO pointInfoDAO;
    @Value("${mybatis.configuration.variables.enterpriseId}")
    private String enterpriseId;
    @Override
    public List<MiniPointPageVO> getPointByOpportunityPointCode(String code) {
        return pointInfoDAO.getPointByOpportunityPointCode(code);
    }

    @Override
    public List<MiniShopDTO> getShopByOpportunityPointCode(String code) {
        return pointInfoDAO.getShopByOpportunityPointCode(enterpriseId,code);
    }
}
