package com.yh.saas.plugin.yiliangyiyun.service.impl;

import com.yh.saas.plugin.yiliangyiyun.entity.DriverPayeeInfo;
import com.yh.saas.plugin.yiliangyiyun.mapper.DriverPayeeInfoMapper;
import com.yh.saas.plugin.yiliangyiyun.service.IDriverPayeeInfoService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 记录收款账户信息 服务实现类
 * </p>
 *
 * @author Gongdc
 * @since 2021-05-29
 */
@Service
public class DriverPayeeInfoServiceImpl extends ServiceImpl<DriverPayeeInfoMapper, DriverPayeeInfo> implements IDriverPayeeInfoService {

    /**
     * 删除收款人信息
     *
     * @param id
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteDriverPayee(String id) {
        DriverPayeeInfo driverPayeeInfo = this.selectById(id);
        if (driverPayeeInfo != null) {
            this.deleteById(driverPayeeInfo.getId());
        }
    }
}
