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

import com.yh.saas.plugin.yiliangyiyun.entity.ReceivingUser;
import com.yh.saas.plugin.yiliangyiyun.mapper.ReceivingUserMapper;
import com.yh.saas.plugin.yiliangyiyun.service.IReceivingUserService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 货运收发收货人 服务实现类
 * </p>
 *
 * @author Gongdc
 * @since 2021-08-19
 */
@Service
public class ReceivingUserServiceImpl extends ServiceImpl<ReceivingUserMapper, ReceivingUser> implements IReceivingUserService {

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

    }
}
