提交 | 用户 | 时间
|
4d458e
|
1 |
package com.billion.main.da.service.impl; |
A |
2 |
|
60e1c1
|
3 |
import java.util.Date; |
4d458e
|
4 |
import java.util.List; |
A |
5 |
|
20c287
|
6 |
import cn.hutool.core.util.ObjectUtil; |
4d458e
|
7 |
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
849473
|
8 |
import com.billion.common.utils.SecurityUtils; |
4d458e
|
9 |
import org.springframework.beans.factory.annotation.Autowired; |
A |
10 |
import org.springframework.stereotype.Service; |
|
11 |
import com.billion.main.da.mapper.DaParamCollectionMapper; |
|
12 |
import com.billion.main.da.domain.DaParamCollection; |
|
13 |
import com.billion.main.da.service.IDaParamCollectionService; |
849473
|
14 |
|
A |
15 |
import static org.apache.commons.lang3.SystemUtils.getUserName; |
4d458e
|
16 |
|
A |
17 |
/** |
|
18 |
* 参数采集Service业务层处理 |
|
19 |
* |
|
20 |
* @author Billion-Yi |
|
21 |
* @date 2024-11-20 |
|
22 |
*/ |
|
23 |
@Service |
|
24 |
public class DaParamCollectionServiceImpl extends ServiceImpl<DaParamCollectionMapper, DaParamCollection> implements IDaParamCollectionService |
|
25 |
{ |
|
26 |
@Autowired |
|
27 |
private DaParamCollectionMapper daParamCollectionMapper; |
|
28 |
|
|
29 |
/** |
|
30 |
* 查询参数采集 |
|
31 |
* |
|
32 |
* @param id 参数采集主键 |
|
33 |
* @return 参数采集 |
|
34 |
*/ |
|
35 |
@Override |
|
36 |
public DaParamCollection selectDaParamCollectionById(Long id) |
|
37 |
{ |
|
38 |
return daParamCollectionMapper.selectDaParamCollectionById(id); |
|
39 |
} |
|
40 |
|
|
41 |
/** |
|
42 |
* 查询参数采集列表 |
|
43 |
* |
|
44 |
* @param daParamCollection 参数采集 |
|
45 |
* @return 参数采集 |
|
46 |
*/ |
|
47 |
@Override |
|
48 |
public List<DaParamCollection> selectDaParamCollectionList(DaParamCollection daParamCollection) |
|
49 |
{ |
20c287
|
50 |
if(ObjectUtil.isNotNull(daParamCollection.getTimeQuery())){ |
A |
51 |
daParamCollection.setStartTime(daParamCollection.getTimeQuery()[0]); |
|
52 |
daParamCollection.setStopTime(daParamCollection.getTimeQuery()[1]); |
|
53 |
} |
4d458e
|
54 |
return daParamCollectionMapper.selectDaParamCollectionList(daParamCollection); |
A |
55 |
} |
|
56 |
|
|
57 |
/** |
|
58 |
* 新增参数采集 |
|
59 |
* |
|
60 |
* @param daParamCollection 参数采集 |
|
61 |
* @return 结果 |
|
62 |
*/ |
|
63 |
@Override |
|
64 |
public int insertDaParamCollection(DaParamCollection daParamCollection) |
|
65 |
{ |
60e1c1
|
66 |
daParamCollection.setCollectTime(new Date()); |
849473
|
67 |
daParamCollection.setCreateBy(getUserName()); |
4d458e
|
68 |
return daParamCollectionMapper.insertDaParamCollection(daParamCollection); |
A |
69 |
} |
|
70 |
|
|
71 |
/** |
|
72 |
* 修改参数采集 |
|
73 |
* |
|
74 |
* @param daParamCollection 参数采集 |
|
75 |
* @return 结果 |
|
76 |
*/ |
|
77 |
@Override |
|
78 |
public int updateDaParamCollection(DaParamCollection daParamCollection) |
|
79 |
{ |
|
80 |
return daParamCollectionMapper.updateDaParamCollection(daParamCollection); |
|
81 |
} |
|
82 |
|
|
83 |
/** |
|
84 |
* 批量删除参数采集 |
|
85 |
* |
|
86 |
* @param ids 需要删除的参数采集主键 |
|
87 |
* @return 结果 |
|
88 |
*/ |
|
89 |
@Override |
|
90 |
public int deleteDaParamCollectionByIds(Long[] ids) |
|
91 |
{ |
|
92 |
return daParamCollectionMapper.deleteDaParamCollectionByIds(ids); |
|
93 |
} |
|
94 |
|
|
95 |
/** |
|
96 |
* 删除参数采集信息 |
|
97 |
* |
|
98 |
* @param id 参数采集主键 |
|
99 |
* @return 结果 |
|
100 |
*/ |
|
101 |
@Override |
|
102 |
public int deleteDaParamCollectionById(Long id) |
|
103 |
{ |
|
104 |
return daParamCollectionMapper.deleteDaParamCollectionById(id); |
|
105 |
} |
|
106 |
} |