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;
|
}
|
}
|