package com.fdkankan.manage.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.fdkankan.manage.entity.MqCameraLevel; import com.fdkankan.manage.entity.MqNumLevel; import com.fdkankan.manage.mapper.IMqNumLevelMapper; import com.fdkankan.manage.service.IMqNumLevelService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; /** *

* 服务实现类 *

* * @author * @since 2024-04-17 */ @Service public class MqNumLevelServiceImpl extends ServiceImpl implements IMqNumLevelService { @Override public MqNumLevel getByNum(String num) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(MqNumLevel::getNum,num); return this.getOne(wrapper); } @Override public void saveEntity(String num, Integer configId) { MqNumLevel mqNumLevel = new MqNumLevel(); mqNumLevel.setNum(num); mqNumLevel.setQueueConfigId(configId); this.save(mqNumLevel); } @Override public void updateLevelById(Integer id, Integer configId) { LambdaUpdateWrapper wrapper = new LambdaUpdateWrapper<>(); wrapper.eq(MqNumLevel::getId,id); wrapper.set(MqNumLevel::getQueueConfigId,configId); this.update(wrapper); } }