提交 | 用户 | 时间
|
a6de49
|
1 |
package com.iailab.module.data.channel.kio.service.impl; |
H |
2 |
|
|
3 |
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
aecc49
|
4 |
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
L |
5 |
import com.iailab.framework.common.pojo.PageResult; |
a6de49
|
6 |
import com.iailab.module.data.channel.kio.dao.ChannelKioTagDao; |
H |
7 |
import com.iailab.module.data.channel.kio.entity.ChannelKioTagEntity; |
|
8 |
import com.iailab.module.data.channel.kio.service.ChannelKioTagService; |
aecc49
|
9 |
import com.iailab.module.data.channel.kio.vo.KioTagPageReqVO; |
a6de49
|
10 |
import lombok.extern.slf4j.Slf4j; |
H |
11 |
import org.springframework.stereotype.Service; |
|
12 |
|
|
13 |
import javax.annotation.Resource; |
|
14 |
import java.util.Date; |
|
15 |
import java.util.List; |
|
16 |
|
|
17 |
/** |
aecc49
|
18 |
* @author lirm |
a6de49
|
19 |
* @Description |
aecc49
|
20 |
* @createTime 2024年08月26日 |
a6de49
|
21 |
*/ |
H |
22 |
@Slf4j |
|
23 |
@Service |
aecc49
|
24 |
public class ChannelKioTagServiceImpl extends ServiceImpl<ChannelKioTagDao, ChannelKioTagEntity> implements ChannelKioTagService { |
a6de49
|
25 |
@Resource |
H |
26 |
private ChannelKioTagDao channelKioTagDao; |
|
27 |
|
|
28 |
@Override |
aecc49
|
29 |
public PageResult<ChannelKioTagEntity> queryPage(KioTagPageReqVO reqVO) { |
L |
30 |
return channelKioTagDao.selectPage(reqVO); |
a6de49
|
31 |
} |
H |
32 |
|
|
33 |
@Override |
aecc49
|
34 |
public ChannelKioTagEntity info(String id) { |
L |
35 |
return channelKioTagDao.selectById(id); |
a6de49
|
36 |
} |
H |
37 |
|
|
38 |
@Override |
aecc49
|
39 |
public void add(ChannelKioTagEntity channelKioTagEntity) { |
L |
40 |
channelKioTagDao.insert(channelKioTagEntity); |
a6de49
|
41 |
} |
H |
42 |
|
|
43 |
@Override |
aecc49
|
44 |
public void update(ChannelKioTagEntity channelKioTagEntity) { |
L |
45 |
channelKioTagDao.updateById(channelKioTagEntity); |
a6de49
|
46 |
} |
H |
47 |
|
|
48 |
@Override |
aecc49
|
49 |
public void delete(String id) { |
L |
50 |
channelKioTagDao.deleteById(id); |
a6de49
|
51 |
} |
H |
52 |
|
|
53 |
@Override |
aecc49
|
54 |
public List<ChannelKioTagEntity> getByDevice(String device) { |
a6de49
|
55 |
QueryWrapper<ChannelKioTagEntity> wrapper = new QueryWrapper<>(); |
aecc49
|
56 |
wrapper.like("device", device); |
L |
57 |
wrapper.orderByAsc("tag_id"); |
|
58 |
List<ChannelKioTagEntity> list = channelKioTagDao.selectList(wrapper); |
|
59 |
return list; |
a6de49
|
60 |
} |
H |
61 |
|
|
62 |
@Override |
aecc49
|
63 |
public ChannelKioTagEntity getByTagName(String tagName) { |
a6de49
|
64 |
QueryWrapper<ChannelKioTagEntity> wrapper = new QueryWrapper<>(); |
H |
65 |
wrapper.eq("tag_name", tagName); |
aecc49
|
66 |
ChannelKioTagEntity entity = channelKioTagDao.selectOne(wrapper); |
L |
67 |
return entity; |
a6de49
|
68 |
} |
H |
69 |
|
|
70 |
@Override |
|
71 |
public void deleteByDeviceName(String name) { |
aecc49
|
72 |
channelKioTagDao.delete(new QueryWrapper<ChannelKioTagEntity>().eq("device",name)); |
a6de49
|
73 |
} |
H |
74 |
} |