1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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);
    }
}