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.FireVideoDto;
import com.yeejoin.amos.boot.module.ccs.api.entity.FireVideo;
import com.yeejoin.amos.boot.module.ccs.api.mapper.FireVideoMapper;
import com.yeejoin.amos.boot.module.ccs.api.service.IFireVideoService;
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 FireVideoServiceImpl extends BaseService<FireVideoDto, FireVideo, FireVideoMapper> implements IFireVideoService {
    /**
     * 分页查询
     */
    public Page<FireVideoDto> queryForFireVideoPage(Page<FireVideoDto> page, @Condition(Operator.like) String name, String stationCode, @Condition(Operator.in) List<String> buildingMrid,
                                                     @Condition(Operator.like) String mrid) {
        return this.queryForPage(page, "create_date", false, name, stationCode, buildingMrid, mrid);
    }

    @Override
    public Page<FireVideoDto> listByRelationMrid(Page page, String relationId) {
        return this.baseMapper.listByRelationMrid(page, relationId);
    }
}