package com.yeejoin.amos.boot.module.ccs.biz.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ccs.api.dto.FireVehicleDto;
import com.yeejoin.amos.boot.module.ccs.api.entity.FireVehicle;
import com.yeejoin.amos.boot.module.ccs.api.mapper.FireVehicleMapper;
import com.yeejoin.amos.boot.module.ccs.api.service.IFireVehicleService;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.annotation.Condition;
import org.typroject.tyboot.core.rdbms.annotation.Operator;
import org.typroject.tyboot.core.rdbms.service.BaseService;

import java.util.List;

/**
 * 消防车辆信息服务实现类
 *
 * @author system_generator
 * @date 2021-11-09
 */
@Service
public class FireVehicleServiceImpl extends BaseService<FireVehicleDto, FireVehicle, FireVehicleMapper> implements IFireVehicleService {
    /**
     * 分页查询
     */
    public Page<FireVehicleDto> queryForFireVehiclePage(Page<FireVehicleDto> page, @Condition(Operator.like) String name, String stationCode) {
        return this.queryForPage(page, "create_date", false, name, stationCode);
    }

    @Override
    public List<FireVehicleDto> queryForFireVehicleList(String stationCode) {
        return this.queryForList("syn_date", false, stationCode);
    }
}