69 lines
2.1 KiB
Java
69 lines
2.1 KiB
Java
package com.ai.da.service;
|
||
|
||
import com.ai.da.model.dto.ContestantDTO;
|
||
import com.ai.da.model.vo.CheckOTPVO;
|
||
import com.ai.da.model.vo.ContestantCountVO;
|
||
import com.ai.da.model.vo.PageVisitCountVO;
|
||
import org.springframework.web.multipart.MultipartFile;
|
||
|
||
import java.util.Map;
|
||
|
||
public interface GlobalAwardService {
|
||
String uploadPdf(MultipartFile file, String email) throws Exception;
|
||
|
||
String uploadVideo(MultipartFile file, String email) throws Exception;
|
||
|
||
Map<String, Object> saveContestant(ContestantDTO request);
|
||
|
||
com.ai.da.model.dto.ContestantDTO getContestantByID(String email);
|
||
|
||
void checkEmail(String email);
|
||
|
||
CheckOTPVO checkCode(String email, String otp);
|
||
|
||
void checkSecurityToken(String email, String securityToken);
|
||
|
||
/**
|
||
* 导出参赛者列表为 Excel(二进制)
|
||
* @return Excel 文件的字节数组
|
||
*/
|
||
byte[] exportContestants() throws Exception;
|
||
|
||
/**
|
||
* 将参赛者列表导出并保存到服务端本地目录(使用服务配置的 uploadDir/exports)
|
||
*/
|
||
void saveContestantsToLocal() throws Exception;
|
||
|
||
/**
|
||
* 将参赛者文件打包为 ZIP 并返回字节数组(不落盘,直接响应给浏览器)
|
||
* @param minContestantNumber 最小参赛者编号
|
||
* @param maxContestantNumber 最大参赛者编号
|
||
* @return ZIP 文件的字节数组
|
||
*/
|
||
byte[] exportContestantFilesAsZip(Integer minContestantNumber, Integer maxContestantNumber) throws Exception;
|
||
|
||
/**
|
||
* 查询参赛者总数和最大参赛者编号
|
||
* @return 参赛者数量和最大参赛者编号
|
||
*/
|
||
ContestantCountVO getContestantCount();
|
||
|
||
/**
|
||
* 记录比赛页面的访问量
|
||
* <ul>
|
||
* <li>rawVisitCount: 每次访问或刷新都计一次(不去重)</li>
|
||
* <li>uniqueVisitCount: 5秒内刷新只算一次(基于会话去重)</li>
|
||
* </ul>
|
||
* @param sessionId 会话ID(用于5秒去重判断)
|
||
*/
|
||
void recordPageVisit(String sessionId);
|
||
|
||
/**
|
||
* 获取比赛页面的两种访问量
|
||
* @return 原始访问量和去重访问量
|
||
*/
|
||
PageVisitCountVO getPageVisitCount();
|
||
}
|
||
|
||
|