package admin.modules.chatgpt.service;

import admin.base.CommonService;
import admin.base.PageInfo;
import admin.modules.chatgpt.domain.ChatgptRoleDesc;
import admin.modules.chatgpt.service.dto.ChatgptRoleDescDto;
import admin.modules.chatgpt.service.dto.ChatgptRoleDescQueryCriteria;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
* @author wk
* @date 2023-11-27
*/
public interface ChatgptRoleDescService extends CommonService<ChatgptRoleDesc>  {

    static final String CACHE_KEY = "chatgptRoleDesc";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<ChatgptRoleDescDto>
    */
    PageInfo<ChatgptRoleDescDto> queryAll(ChatgptRoleDescQueryCriteria query, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<ChatgptRoleDescDto>
    */
    List<ChatgptRoleDescDto> queryAll(ChatgptRoleDescQueryCriteria query);

    ChatgptRoleDesc getById(Integer id);
    ChatgptRoleDescDto findById(Integer id);

    /**
     * 插入一条新数据。
     */
    int insert(ChatgptRoleDescDto resources);
    int updateById(ChatgptRoleDescDto resources);
    int removeById(Integer id);
    int removeByIds(Set<Integer> ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    // void download(List<ChatgptRoleDescDto> all, HttpServletResponse response) throws IOException;

    List<Map<String, Object>> queryIndexList();

    List<Map<String,Object>> queryAIList();
}