package com.ruoyi.system.service;

import com.ruoyi.system.entity.CommonEntity;
import com.ruoyi.system.entity.TableSql;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

public interface ICommonService {


    /**
     * 单表查询列表
     */
    List<CommonEntity> selectList(CommonEntity commonEntity);

    /**
     * 批量新增
     */
    int batchInsert(CommonEntity commonEntity);

    /**
     * 修改
     */
    int edit(CommonEntity commonEntity);

    /**
     * 批量删除
     */
    int batchDelete(CommonEntity commonEntity);

    /**
     * 根据sqlkey 执行sql并返回结果
     */
    List<CommonEntity> queryTableList(CommonEntity commonEntity, TableSql tableSql);

    /**
     * 导出列表
     */
    void export(HttpServletResponse response, CommonEntity commonEntity) throws Exception;

    /**
     * 导出模版
     */
    void exportTemplate(HttpServletResponse response, String tableName, String sqlKey) throws Exception;

}
