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

import cn.superdesk.uniorder.dao.entity.operationCenter.OperationCenterPayment;
import cn.superdesk.uniorder.dao.mapper.operationCenter.OperationCenterPaymentMapper;
import cn.superdesk.uniorder.dto.param.operationCenter.operators.OperationCenterPaymentCustomerParam;
import cn.superdesk.uniorder.dto.param.operationCenter.payment.OperationCenterPayParam;
import cn.superdesk.uniorder.dto.vo.operationCenter.base.OperationCenterVo;
import cn.superdesk.uniorder.dto.vo.operationCenter.payment.OperationCenterPaymentVo;
import cn.superdesk.uniorder.service.operationCenter.OperationCenterPaymentService;
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:57
 * Description : 支付方式-service
 */

@Slf4j
@Service
@RequiredArgsConstructor
public class OperationCenterPaymentServiceImpl implements OperationCenterPaymentService {
    private final OperationCenterPaymentMapper operationCenterPaymentMapper;

    @Override
    public int insertSelective(OperationCenterPayment operationCenterPayment) {
        return operationCenterPaymentMapper.insertSelective(operationCenterPayment);
    }

    @Override
    public int updateByPrimaryKeySelective(OperationCenterPayment operationCenterPayment) {
        return operationCenterPaymentMapper.updateByPrimaryKeySelective(operationCenterPayment);
    }

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

    @Override
    public OperationCenterPayment findById(Long id) {
        return operationCenterPaymentMapper.selectByPrimaryKey(id);
    }

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

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

    @Override
    public List<OperationCenterPaymentVo> getOperationCenterPaymentList(OperationCenterPayParam param) {
        return operationCenterPaymentMapper.getOperationCenterPaymentList(param);
    }

    @Override
    public List<OperationCenterVo> getPaymentByCustomerId(Long customerId) {
        return operationCenterPaymentMapper.getPaymentByCustomerId(customerId);
    }

    @Override
    public OperationCenterPaymentCustomerParam linkCustomerByPaymentId(String paymentId) {
        return operationCenterPaymentMapper.linkCustomerByPaymentId(paymentId);
    }


    @Override
    public OperationCenterPayment getPaymentByPayName(Map<String, Object> conditions) {
        return operationCenterPaymentMapper.getPaymentByConditions(conditions);
    }

}
