/**
* 文件：TableIndexService.java
* 版本：1.0.0
* 日期：
* Copyright &reg; 
* All right reserved.
*/

package com.mortals.xhx.base.system.table.service;


import com.mortals.framework.dao.ICRUDSubmeterDao;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.TableParam;
import com.mortals.framework.service.ICRUDService;
import com.mortals.framework.service.IManagerService;
import com.mortals.framework.service.ITaskExcuteService;
import com.mortals.xhx.base.system.table.model.TableIndexEntity;

import java.util.Set;

/**
 * <p>Title: 分表索引信息</p>
 * <p>Description: TableIndexService service接口 </p>
 * <p>Copyright: Copyright &reg;  </p>
 * <p>Company: </p>
 * @author 
 * @version 1.0.0
 */

public interface TableIndexService extends ICRUDService<TableIndexEntity,Long> , ITaskExcuteService, IManagerService {
    /**
     * 查询上个月创建的表集合
     *
     * @return
     * @throws AppException
     */
    Set<String> findPrevMonthTables() throws AppException;

    /**
     * 查询最近3个月创建的表集合
     *
     * @return
     * @throws AppException
     */
    Set<String> findThreeMonthTables() throws AppException;

    /**
     * 保存表信息
     *
     * @param tableName
     * @param tableMark
     * @return
     * @throws AppException
     */
    int saveTableName(String tableName, String tableMark) throws AppException;

    /**
     * 创建表
     *
     * @param submeterDao
     * @param param
     * @return
     * @throws AppException
     */
    boolean createTable(ICRUDSubmeterDao submeterDao, TableParam param) throws AppException;
}