123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- 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;
- /**
- * <p>
- * 服务实现类
- * </p>
- *
- * @author
- * @since 2024-04-17
- */
- @Service
- public class MqNumLevelServiceImpl extends ServiceImpl<IMqNumLevelMapper, MqNumLevel> implements IMqNumLevelService {
- @Override
- public MqNumLevel getByNum(String num) {
- LambdaQueryWrapper<MqNumLevel> 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<MqNumLevel> wrapper = new LambdaUpdateWrapper<>();
- wrapper.eq(MqNumLevel::getId,id);
- wrapper.set(MqNumLevel::getQueueConfigId,configId);
- this.update(wrapper);
- }
- }
|