package com.fdkankan.manage.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.fdkankan.manage.entity.ScenePlusExt; import com.fdkankan.manage.mapper.IScenePlusExtMapper; import com.fdkankan.manage.service.IScenePlusExtService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; import java.util.HashMap; import java.util.List; /** *

* 服务实现类 *

* * @author * @since 2022-08-02 */ @Service public class ScenePlusExtServiceImpl extends ServiceImpl implements IScenePlusExtService { @Override public ScenePlusExt getByPlusId(Long plusId) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(ScenePlusExt::getPlusId,plusId); List list = this.list(wrapper); if(list != null && list.size() >0){ return list.get(0); } return null; } @Override public HashMap getByPlusIds(List plusIds) { HashMap map = new HashMap<>(); if(plusIds == null || plusIds.isEmpty()){ return map; } LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.in(ScenePlusExt::getPlusId,plusIds); List list = this.list(wrapper); list.forEach(entity -> map.put(entity.getPlusId(),entity)); return map; } @Override public void delByPlus(Long plusId) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(ScenePlusExt::getPlusId,plusId); this.remove(wrapper); } }