package com.base.plan.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.base.plan.model.dto.request.IndicatorReqDTO;
import com.base.plan.model.entity.FzIndicatorInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import javax.annotation.Resource;
import java.util.List;

@Mapper
@Resource
public interface FzIndicatorInfoMapper extends BaseMapper<FzIndicatorInfo> {

    List<FzIndicatorInfo> getFzIndicatorInfoList(@Param("req") IndicatorReqDTO req);

    default void deleteByReqIds(List<String> reqIds){
        QueryWrapper<FzIndicatorInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.in("req_id",reqIds);
        this.delete(queryWrapper);
    }

}
