| | |
| | | public List<XpVehicleModel> queryByName(String name) { |
| | | return this.list(new LambdaQueryWrapper<XpVehicleModel>() |
| | | .eq(XpVehicleModel::getDeleted, 0) |
| | | .like(XpVehicleModel::getName, name)); |
| | | .eq(XpVehicleModel::getName, name)); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean logicalRemoveById(String id) { |
| | | // XpVehicleModel entity = this.getById(id); |
| | | // if (entity != null) { |
| | | // entity.setDeleted(true); |
| | | // return this.updateById(entity); |
| | | // } |
| | | return this.removeById(id); |
| | | public boolean logicalRemoveById(Long id) { |
| | | XpVehicleModel entity = this.getById(id); |
| | | if (entity != null) { |
| | | entity.setDeleted(true); |
| | | return this.updateById(entity); |
| | | } |
| | | return true; |
| | | } |
| | | /** |
| | | * 获取指定车型ID关联的车辆数量 |
| | |
| | | * @return 车辆数量 |
| | | */ |
| | | @Override |
| | | public int getVehicleCount(String id){ |
| | | public int getVehicleCount(Long id){ |
| | | return this.baseMapper.getVehicleCount(id); |
| | | } |
| | | |