cuikaidong
2025-06-12 44e283b774bb1168d0c17dfe5070a1ca8e2274cd
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
package org.jeecg.modules.iot.service.impl;
 
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.iot.entity.Equipment;
import org.jeecg.modules.iot.entity.ParameterGroup;
import org.jeecg.modules.iot.mapper.ParameterGroupMapper;
import org.jeecg.modules.iot.service.IParameterGroupService;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
/**
 * @Description: 参数组
 * @Author: cuikaidong
 * @Date: 2024-12-31
 * @Version: V1.0
 */
@Service
public class ParameterGroupServiceImpl extends ServiceImpl<ParameterGroupMapper, ParameterGroup> implements IParameterGroupService {
 
    @Override
    public List<ParameterGroup> findParameterGroupByServerId(String serverDeployId) {
        return new LambdaQueryChainWrapper<>(baseMapper).eq(ParameterGroup::getServerDeployId,serverDeployId).list();
    }
 
    @Override
    public Boolean findParameterGroupByName(ParameterGroup parameterGroup) {
        List<ParameterGroup> equipmentList = new LambdaQueryChainWrapper<>(baseMapper)
                .eq(ParameterGroup::getEquipmentId, parameterGroup.getEquipmentId())
                .eq(ParameterGroup::getName, parameterGroup.getName())
                .list();
        return equipmentList.size() > 0;
    }
 
    @Override
    public Boolean findParameterGroupByCode(ParameterGroup parameterGroup) {
        List<ParameterGroup> equipmentList = new LambdaQueryChainWrapper<>(baseMapper)
                .eq(ParameterGroup::getEquipmentId, parameterGroup.getEquipmentId())
                .eq(ParameterGroup::getCode, parameterGroup.getCode())
                .list();
        return equipmentList.size() > 0;
    }
}