| | |
| | | |
| | | @Override |
| | | public List<Cars> findList(Cars cars) { |
| | | if(Objects.nonNull(cars) |
| | | && Constants.equalsInteger(Constants.ZERO,cars.getType())){ |
| | | return this.getGwCar(); |
| | | } |
| | | QueryWrapper<Cars> wrapper = new QueryWrapper<>(cars); |
| | | wrapper.lambda().eq(Cars::getIsdeleted,Constants.ZERO); |
| | | return carsMapper.selectList(wrapper); |
| | | } |
| | | |
| | | public List<Cars> getGwCar(){ |
| | | List<Cars> list = carsMapper.selectJoinList(Cars.class, |
| | | new MPJLambdaWrapper<Cars>().selectAll(Cars.class) |
| | | .leftJoin(Category.class,Category::getId,Cars::getCateId) |
| | | .eq(Category::getBizType,Constants.FOUR) |
| | | .eq(Cars::getIsdeleted,Constants.ZERO) |
| | | ); |
| | | return list; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public PageData<Cars> findPage(PageWrap<Cars> pageWrap) { |
| | | IPage<Cars> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |