82 lines
1.8 KiB
Java
82 lines
1.8 KiB
Java
package com.ruoyi.jarvis.service;
|
||
|
||
import com.ruoyi.jarvis.domain.Comment;
|
||
import com.ruoyi.jarvis.domain.dto.CommentStatistics;
|
||
import com.ruoyi.jarvis.domain.dto.CommentApiStatistics;
|
||
import com.ruoyi.jarvis.domain.dto.CommentCallHistory;
|
||
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
|
||
/**
|
||
* 评论管理 Service 接口
|
||
*/
|
||
public interface ICommentService {
|
||
|
||
/**
|
||
* 查询京东评论列表
|
||
*/
|
||
List<Comment> selectCommentList(Comment comment);
|
||
|
||
/**
|
||
* 根据ID查询京东评论
|
||
*/
|
||
Comment selectCommentById(Long id);
|
||
|
||
/**
|
||
* 更新评论使用状态
|
||
*/
|
||
int updateCommentIsUse(Comment comment);
|
||
|
||
/**
|
||
* 批量删除评论
|
||
*/
|
||
int deleteCommentByIds(Long[] ids);
|
||
|
||
/**
|
||
* 重置评论使用状态(批量)
|
||
*/
|
||
int resetCommentIsUseByProductId(String productId);
|
||
|
||
/**
|
||
* 获取评论统计信息(包含Redis映射)
|
||
*/
|
||
List<CommentStatistics> getCommentStatistics(String source);
|
||
|
||
/**
|
||
* 记录接口调用统计
|
||
*/
|
||
void recordApiCall(String apiType, String productType, boolean success);
|
||
|
||
/**
|
||
* 记录接口调用历史(带IP)
|
||
*/
|
||
void recordApiCallHistory(String productType, String ip);
|
||
|
||
/**
|
||
* 获取接口调用历史记录
|
||
*/
|
||
List<CommentCallHistory> getApiCallHistory(int pageNum, int pageSize);
|
||
|
||
/**
|
||
* 获取使用统计(今天/7天/30天/累计)
|
||
*/
|
||
Map<String, Long> getUsageStatistics();
|
||
|
||
/**
|
||
* 获取接口调用统计
|
||
*/
|
||
List<CommentApiStatistics> getApiStatistics(String apiType, String productType, String startDate, String endDate);
|
||
|
||
/**
|
||
* 获取Redis产品类型映射(京东)
|
||
*/
|
||
Map<String, String> getJdProductTypeMap();
|
||
|
||
/**
|
||
* 获取Redis产品类型映射(淘宝)
|
||
*/
|
||
Map<String, String> getTbProductTypeMap();
|
||
}
|
||
|