英语2区代理限制

This commit is contained in:
2025-07-23 14:15:20 +08:00
parent 906ad5f978
commit 120502f3bf

View File

@@ -430,10 +430,14 @@ public class DiamondGiveHistoryService extends ServiceImpl<DiamondGiveHistoryMap
throw new ServiceException(BusiStatus.PARAMETERILLEGAL, "轉贈鉆石數額需大於0鉆石");
}
// 不能給自己轉贈并且 不能给不是自己的子代理转
boolean partitionLimit = users.getPartitionId() == PartitionEnum.ARAB.getId()
|| users.getPartitionId() == PartitionEnum.TURKEY.getId()
|| users.getPartitionId() == PartitionEnum.ENGLISH2.getId();
if (uid.equals(toUid)) {
throw new ServiceException(BusiStatus.SEND_SELF_FAIL);
} else if ((users.getPartitionId() == PartitionEnum.ARAB.getId() || users.getPartitionId() == PartitionEnum.TURKEY.getId())
&& rechargeUserService.isRechargeUser(toUid) && !rechargeUserService.isSubRechargeUser(toUid, uid)) {
} else if (partitionLimit
&& rechargeUserService.isRechargeUser(toUid) //是代理
&& !rechargeUserService.isSubRechargeUser(toUid, uid)) {//不是旗下子代理
throw new ServiceException(BusiStatus.RECHARGE_USER_CANNOT_GIVE);
}