Lius
2025-03-12 da82d77c6773f65aadfde810233615b602da655a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
    }
}