package com.jsowell.pile.service.impl;

import com.google.common.collect.Lists;
import com.jsowell.pile.domain.WxpayRefundCallback;
import com.jsowell.pile.mapper.WxpayRefundCallbackMapper;
import com.jsowell.pile.service.WxpayRefundCallbackService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class WxpayRefundCallbackServiceImpl implements WxpayRefundCallbackService {

    @Resource
    private WxpayRefundCallbackMapper wxpayRefundCallbackMapper;

    // @Override
    // public int deleteByPrimaryKey(Integer id) {
    //     return wxpayRefundCallbackMapper.deleteByPrimaryKey(id);
    // }

    @Override
    public int insertSelective(WxpayRefundCallback record) {
        return wxpayRefundCallbackMapper.insertSelective(record);
    }

    @Override
    public List<WxpayRefundCallback> selectWxpayRefundCallbackList(List<String> outTradeNoList) {
        return wxpayRefundCallbackMapper.selectWxpayRefundCallbackList(outTradeNoList);
    }

    @Override
    public List<WxpayRefundCallback> selectByOrderCodeList(List<String> orderCodeList) {
        if (CollectionUtils.isEmpty(orderCodeList)) {
            return Lists.newArrayList();
        }
        return wxpayRefundCallbackMapper.selectByOrderCodeList(orderCodeList);
    }

    // @Override
    // public WxpayRefundCallback selectByPrimaryKey(Integer id) {
    //     return wxpayRefundCallbackMapper.selectByPrimaryKey(id);
    // }

    // @Override
    // public int updateByPrimaryKeySelective(WxpayRefundCallback record) {
    //     return wxpayRefundCallbackMapper.updateByPrimaryKeySelective(record);
    // }

    // @Override
    // public int updateByPrimaryKey(WxpayRefundCallback record) {
    //     return wxpayRefundCallbackMapper.updateByPrimaryKey(record);
    // }

}
