package com.ssm.manage.service.impl;

import com.ssm.manage.entity.PromotionRechargeList;
import com.ssm.manage.mapper.PromotionRechargeListMapper;
import com.ssm.manage.query.PromotionListRequest;
import com.ssm.manage.service.PromotionRechargeListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PromotionRechargeListServiceImpl implements PromotionRechargeListService {
    @Autowired
    private PromotionRechargeListMapper mapper;

    @Override
    public int addPromotionRechargeList(List<PromotionRechargeList> promotionRechargeLists) {
        return mapper.addPromotionRechargeList(promotionRechargeLists);
    }

    @Override
    public List<PromotionRechargeList> selectList(PromotionListRequest promotionListRequest) {
        PromotionRechargeList promotionRechargeList = new PromotionRechargeList();
        promotionRechargeList.setPromotionId(promotionListRequest.getId());
        return mapper.select(promotionRechargeList);
    }

    @Override
    public int delete(PromotionRechargeList rechargeList) {
        return mapper.delete(rechargeList);
    }
}
