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.TCourierCard;
import com.bohuikeji.delivery.backstage.mapper.TCourierCardMapper;
import com.bohuikeji.delivery.backstage.service.ITCourierCardService;
import com.bohuikeji.frame.module.admin.base.ServiceImplBase;
import org.springframework.stereotype.Service;

@Service
public class TCourierCardServiceImpl extends ServiceImplBase<TCourierCardMapper, TCourierCard> implements ITCourierCardService {
    /**
     * 是否绑定支付宝
     *
     * @param courierId 骑手ID
     * @return
     */
    @Override
    public boolean isBuildAliPay(Integer courierId) {
        if(getOne(new QueryWrapper<TCourierCard>()
                .eq("courier_id",courierId)
                .eq("card_bank","支付宝"),false)!=null){
            return true;
        }
        return false;
    }
}
