package cn.besteam.modules.medical.service.impl;
|
|
import cn.besteam.modules.medical.entity.MwDeviceAgent;
|
import cn.besteam.modules.medical.entity.MwDeviceAgentDevice;
|
import cn.besteam.modules.medical.mapper.MwDeviceAgentMapper;
|
import cn.besteam.modules.medical.service.IMwDeviceAgentDeviceService;
|
import cn.besteam.modules.medical.service.IMwDeviceAgentService;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
|
/**
|
* @Description: 设备代理商
|
* @author: besteam
|
* @date: 2020-04-25
|
* @version: V1.0
|
*/
|
@Service
|
public class MwDeviceAgentServiceImpl extends ServiceImpl<MwDeviceAgentMapper, MwDeviceAgent> implements IMwDeviceAgentService {
|
|
@Autowired
|
private IMwDeviceAgentDeviceService mwDeviceAgentDeviceService;
|
|
@Transactional(rollbackFor = Exception.class)
|
@Override
|
public boolean delete(Integer id) {
|
|
removeById(id);
|
mwDeviceAgentDeviceService.remove(new QueryWrapper<MwDeviceAgentDevice>().lambda().eq(MwDeviceAgentDevice::getDeviceAgentId, id));
|
return true;
|
}
|
|
}
|