This commit is contained in:
wells
2026-08-05 13:48:48 +08:00
commit 1303bf37dc
80 changed files with 5154 additions and 0 deletions
@@ -0,0 +1,59 @@
package com.tailbet.service;
import com.tailbet.model.entity.RedPacket;
import com.tailbet.model.entity.RedPacketRecv;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.math.BigDecimal;
import java.util.List;
/**
* 红包Service接口
*/
public interface IRedPacketService {
// 红包状态
int STATUS_ONGOING = 0;
int STATUS_FINISHED = 1;
int STATUS_REFUND = 2;
// 红包类型
String TYPE_GAME = "game";
String TYPE_RANDOM = "random";
/**
* 发红包
*/
RedPacket sendRp(Long userId, Long groupId, BigDecimal totalAmount,
Integer totalCount, Long roundId);
/**
* 领红包
*/
RedPacketRecv receiveRp(Long rpId, Long userId);
/**
* 计算领取金额
*/
BigDecimal calculateReceiveAmount(RedPacket rp);
/**
* 获取红包详情
*/
RedPacket getById(Long rpId);
/**
* 获取红包领取列表
*/
List<RedPacketRecv> getReceives(Long rpId);
/**
* 查询红包记录
*/
Page<RedPacket> getRecords(Long userId, Integer pageNum, Integer pageSize);
/**
* 查找进行中的游戏红包
*/
RedPacket getOngoingGameRp(Long groupId);
}