package admin.modules.chatgpt.service; import admin.base.CommonService; import admin.base.PageInfo; import admin.modules.chatgpt.domain.ChatgptRoleSession; import admin.modules.chatgpt.service.dto.ChatgptRoleSessionDto; import admin.modules.chatgpt.service.dto.ChatgptRoleSessionQueryCriteria; import org.springframework.data.domain.Pageable; import org.springframework.scheduling.annotation.Async; import java.util.List; import java.util.Set; /** * @author wk * @date 2023-11-28 */ public interface ChatgptRoleSessionService extends CommonService<ChatgptRoleSession> { static final String CACHE_KEY = "chatgptRoleSession"; /** * 查询数据分页 * @param query 条件 * @param pageable 分页参数 * @return PageInfo<ChatgptRoleSessionDto> */ PageInfo<ChatgptRoleSessionDto> queryAll(ChatgptRoleSessionQueryCriteria query, Pageable pageable); /** * 查询所有数据不分页 * @param query 条件参数 * @return List<ChatgptRoleSessionDto> */ List<ChatgptRoleSessionDto> queryAll(ChatgptRoleSessionQueryCriteria query); ChatgptRoleSession getById(Integer id); ChatgptRoleSessionDto findById(Integer id); /** * 插入一条新数据。 */ ChatgptRoleSession insert(ChatgptRoleSessionDto resources); int updateById(ChatgptRoleSessionDto resources); int removeById(Integer id); int removeByIds(Set<Integer> ids); @Async Integer updateUpdateTime(Integer id); /** * 导出数据 * @param all 待导出的数据 * @param response / * @throws IOException / */ // void download(List<ChatgptRoleSessionDto> all, HttpServletResponse response) throws IOException; }