package com.zy.acs.manager.manager.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zy.acs.manager.manager.entity.FuncSta; import com.zy.acs.manager.manager.mapper.FuncStaMapper; import com.zy.acs.manager.manager.service.FuncStaService; import com.zy.acs.framework.common.Cools; import org.springframework.stereotype.Service; import java.util.List; @Service("funcStaService") public class FuncStaServiceImpl extends ServiceImpl implements FuncStaService { @Override public FuncSta getByCodeAndType(Long codeId, String type) { List list = this.list(new LambdaQueryWrapper().eq(FuncSta::getCode, codeId).eq(FuncSta::getType, type)); if (Cools.isEmpty(list)) { return null; } return list.stream().findFirst().orElse(null); } @Override public FuncSta query(Long agvId, Long codeId, String type) { List list = this.list(new LambdaQueryWrapper() .eq(FuncSta::getAgvId, agvId) .eq(FuncSta::getCode, codeId) .eq(FuncSta::getType, type) ); return list.stream().findFirst().orElse(null); } }