package com.sqx.modules.emergencyContact.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sqx.common.utils.Result;
import com.sqx.modules.emergencyContact.dao.EmergencyContactDao;
import com.sqx.modules.emergencyContact.entity.EmergencyContact;
import com.sqx.modules.emergencyContact.service.EmergencyContactService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Slf4j
@Service
public class EmergencyContactServiceImpl extends ServiceImpl<EmergencyContactDao, EmergencyContact> implements EmergencyContactService {

    @Resource
    private EmergencyContactDao emergencyContactDao;
    @Override
    public void insert(EmergencyContact emergencyContact) {
        emergencyContactDao.insert(emergencyContact);
    }

    @Override
    public Result updateEmergency(EmergencyContact emergencyContact) {
        baseMapper.updateById(emergencyContact);
        return Result.success();
    }

    @Override
    public Result deleteEmergency(Long emergencyId) {
        baseMapper.deleteById(emergencyId);
        return Result.success();
    }

    @Override
    public Result selectEmergencyList(Long userId) {

        return null;
    }
}
