package com.usky.fire.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.usky.fire.domain.DemFireTypicalCase;
import com.usky.fire.mapper.DemFireTypicalCaseMapper;
import com.usky.fire.service.DemFireTypicalCaseService;
import com.usky.common.mybatis.core.AbstractCrudService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 典型火灾案例信息表 服务实现类
 * </p>
 *
 * @author han
 * @since 2023-10-10
 */
@Service
public class DemFireTypicalCaseServiceImpl extends AbstractCrudService<DemFireTypicalCaseMapper, DemFireTypicalCase> implements DemFireTypicalCaseService {
    public List<DemFireTypicalCase> infoList(Integer regionType){
        LambdaQueryWrapper<DemFireTypicalCase> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(DemFireTypicalCase::getRegionType,regionType)
            .orderByAsc(DemFireTypicalCase::getId);
        List<DemFireTypicalCase> list = this.list(queryWrapper);
        return list;
    }
}
