package cn.ibizlab.core.data.mapper;

import cn.ibizlab.core.data.dto.BaseData;
import cn.ibizlab.core.data.model.POSchema;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DbDataMapper   {

    List<BaseData> search(@Param("sql") String sql, @Param("ew") Wrapper<BaseData> wrapper);
    int searchCount(@Param("sql") String sql, @Param("ew") Wrapper<BaseData> wrapper);


    int saveBatch(@Param("schema") POSchema schema, @Param("list") List<BaseData> list);


    int save(@Param("schema") POSchema schema, @Param("data") BaseData data);


    int insertData(@Param("schema") POSchema schema, @Param("data") BaseData data);


    int updateData(@Param("schema") POSchema schema, @Param("data") BaseData data);

    int removeData(@Param("schema") POSchema schema, @Param("data") BaseData data);
}