package cn.superdesk.uniorder.service.operationCenter.impl;

import cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterPaymentBiz;
import cn.superdesk.uniorder.dao.mapper.operationCenter.OperationCenterPaymentBizMapper;
import cn.superdesk.uniorder.service.operationCenter.OperationCenterPaymentBizService;
import cn.superdesk.uniorder.dto.param.operationCenter.payment.OperationCenterPaymentBizParam;
import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author : zx
 * @Create : 2023/3/29 11:58
 * Description : 业务支付方式-service
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class OperationCenterPaymentBizServiceImpl implements OperationCenterPaymentBizService {
    private final OperationCenterPaymentBizMapper operationCenterPaymentBizMapper;
    @Override
    public int insertSelective(OperationCenterPaymentBiz operationCenterPaymentBiz) {
        return operationCenterPaymentBizMapper.insertSelective(operationCenterPaymentBiz);
    }

    @Override
    public int updateByPrimaryKeySelective(OperationCenterPaymentBiz operationCenterPaymentBiz) {
        return operationCenterPaymentBizMapper.updateByPrimaryKeySelective(operationCenterPaymentBiz);
    }

    @Override
    public void deleteObj(Long id) {
        operationCenterPaymentBizMapper.deleteByPrimaryKey(id);
    }

    @Override
    public OperationCenterPaymentBiz findById(Long id) {
        return operationCenterPaymentBizMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<OperationCenterPaymentBiz> findAll(Map<String, Object> queryMap) {
        return null;
    }

    @Override
    public PageInfo<OperationCenterPaymentBiz> findByPaging(Map<String, Object> params, Integer pageNo, Integer pageSize) {
        return null;
    }

    @Override
    public void deleteByPaymentId(Long paymentId) {
        operationCenterPaymentBizMapper.deleteByPaymentId(paymentId);
    }

    @Override
    public List<OperationCenterPaymentBiz> getPaymentBizListByPaymentId(Long paymentId) {
        return operationCenterPaymentBizMapper.getPaymentBizListByPaymentId(paymentId);
    }

    @Override
    public List<OperationCenterPaymentBiz> getPaymentBizListByPayment(List<OperationCenterPaymentBizParam> operationCenterPaymentBizParamList,Long payId) {
        return operationCenterPaymentBizMapper.getPaymentBizListByPayment(operationCenterPaymentBizParamList,payId);
    }
}
