package com.bohuikeji.delivery.backstage.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bohuikeji.delivery.backstage.entity.TCustomerWallet;
import com.bohuikeji.delivery.backstage.mapper.TCustomerWalletMapper;
import com.bohuikeji.delivery.backstage.service.ITCustomerWalletService;
import com.bohuikeji.frame.module.admin.base.ServiceImplBase;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.io.Serializable;


/**
 * <p>
 * 客户钱包 服务实现类
 * </p>
 *
 * @author 10552
 * @since 2019-12-27
 */
@Service
@Slf4j
public class TCustomerWalletServiceImpl extends ServiceImplBase<TCustomerWalletMapper, TCustomerWallet> implements ITCustomerWalletService {


    /**
     * 使用客户ID查询钱包
     *
     * @param customerId
     * @return
     */
    @Override
    public TCustomerWallet getByCustomerId(Serializable customerId) {
        return getOne(new QueryWrapper<TCustomerWallet>().eq("customer_id",customerId),false);
    }
}
