package com.ruoyi.iot.service.impl;
|
|
import com.ruoyi.iot.domain.DeviceOrder;
|
import com.ruoyi.iot.mapper.DeviceOrderMapper;
|
import com.ruoyi.iot.service.IDeviceOrderService;
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
import javax.annotation.Resource;
|
import java.util.List;
|
|
|
/**
|
* @author wmz
|
* @version v1.0
|
* @ClassName DeviceOrderServiceImpl
|
* @description 设备安装业务层处理
|
* @createTime 2023/11/13 0:25
|
*/
|
@Service
|
public class DeviceOrderServiceImpl implements IDeviceOrderService {
|
|
@Resource
|
private DeviceOrderMapper deviceOrderMapper;
|
|
/**
|
* 根据条件分页查询设备安装信息
|
*
|
* @param deviceOrder
|
* @return
|
* @throws Exception
|
*/
|
@Override
|
public List<DeviceOrder> selectDeviceOrderList(DeviceOrder deviceOrder) throws Exception {
|
return deviceOrderMapper.selectDeviceOrderList(deviceOrder);
|
}
|
|
@Override
|
public DeviceOrder selectDeviceOrderById(int id) throws Exception {
|
return deviceOrderMapper.selectDeviceOrderById(id);
|
}
|
|
|
/**
|
* 添加安装设备订单信息
|
*
|
* @param deviceOrder
|
* @return
|
* @throws Exception
|
*/
|
@Override
|
@Transactional
|
public int insertDeviceOrder(DeviceOrder deviceOrder) throws Exception {
|
int rows = deviceOrderMapper.insertDeviceOrder(deviceOrder);
|
return rows;
|
}
|
|
/**
|
* 修改保存设备订单信息
|
*
|
* @param order
|
* @return
|
* @throws Exception
|
*/
|
@Override
|
@Transactional
|
public int updateDeviceOrder(DeviceOrder order) throws Exception {
|
return deviceOrderMapper.updateDeviceOrder(order);
|
}
|
|
/**
|
* 删除设备订单信息
|
*
|
* @param id
|
* @return
|
* @throws Exception
|
*/
|
@Override
|
public int deleteDeviceOrderById(Integer id) throws Exception {
|
return deviceOrderMapper.deleteDeviceOrderById(id);
|
}
|
|
/**
|
* 批量删除设备订单安装信息
|
*
|
* @param ids
|
* @return
|
* @throws Exception
|
*/
|
@Override
|
public int deleteDeviceOrder(Integer[] ids) throws Exception {
|
return deviceOrderMapper.deleteDeviceOrder(ids);
|
}
|
}
|