package org.jeecg.modules.mdc.service.impl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.modules.mdc.entity.ControlSystem;
|
import org.jeecg.modules.mdc.mapper.ControlSystemMapper;
|
import org.jeecg.modules.mdc.service.IControlSystemService;
|
import org.springframework.stereotype.Service;
|
|
import java.util.List;
|
|
/**
|
* @author: LiuS
|
* @create: 2023-04-07 11:16
|
*/
|
@Service
|
public class ControlSystemServiceImpl extends ServiceImpl<ControlSystemMapper, ControlSystem> implements IControlSystemService {
|
@Override
|
public ControlSystem getByDriveType(String driveType) {
|
List<ControlSystem> list = lambdaQuery().eq(ControlSystem::getDriveType, driveType).eq(ControlSystem::getDataFlag, CommonConstant.STATUS_1).list();
|
return !list.isEmpty() ? list.get(0) : null;
|
}
|
}
|