kongdeqiang
2024-04-09 fb050c0dafa5363a73540dd9e52b78487e25ba0a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.boying.service.impl;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.boying.entity.ViolationType;
import com.boying.entity.WhiteList;
import com.boying.mapper.ViolationTypeMapper;
import com.boying.mapper.WhiteListMapper;
import com.boying.service.ViolationTypeService;
import com.boying.service.WhiteListService;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
/**
 * @author kdq
 * @version 1.0.0
 * @ClassName WhiteListServiceImpl.java
 * @Description TODO
 * @createTime 2022年11月21日 11:23:00
 */
@Service
public class WhiteListServiceImpl extends ServiceImpl<WhiteListMapper, WhiteList> implements WhiteListService {
    @Override
    public WhiteList getByCarNo(String carNo) {
        QueryWrapper<WhiteList> whiteListQueryWrapper = new QueryWrapper<>();
        whiteListQueryWrapper.lambda()
                .eq(WhiteList::getCarNo,carNo);
        List<WhiteList> list = list(whiteListQueryWrapper);
        if(list.size()>0){
            return list.get(0);
        }else {
            return null;
        }
    }
}