|
|
@@ -275,6 +275,10 @@ public class GptProxyRechargeServiceImpl implements GptProxyRechargeService {
|
|
|
if (sku.getRechargeType() == 2) {
|
|
|
specificChannel = 8;
|
|
|
subRechargeNum = 12;
|
|
|
+ }
|
|
|
+ //指定了代充渠道 直接用这个渠道 其他不能用
|
|
|
+ if (sku.getRechargeChannelId() != null) {
|
|
|
+ specificChannel = sku.getRechargeChannelId();
|
|
|
}
|
|
|
try {
|
|
|
int updateRemainNum = relationMapper.update(null, Wrappers.lambdaUpdate(GroupsRelation.class)
|
|
|
@@ -327,15 +331,15 @@ public class GptProxyRechargeServiceImpl implements GptProxyRechargeService {
|
|
|
.eq(GptRechargeCardKey::getType, gptRechargeCardKeyType)
|
|
|
.eq(GptRechargeCardKey::getStatus, Boolean.FALSE)
|
|
|
.eq(specificChannel != null, GptRechargeCardKey::getChannelId, specificChannel)
|
|
|
- .ne(specificChannel == null, GptRechargeCardKey::getChannelId, Constant.YEAR_AF_DIAN_CHANNEL_ID)
|
|
|
+ .notIn(specificChannel == null, GptRechargeCardKey::getChannelId, List.of(Constant.YEAR_AF_DIAN_CHANNEL_ID, Constant.HIBOY_PRO_ONE_CHANNEL_ID, Constant.HIBOY_PRO_TWO_CHANNEL_ID))
|
|
|
.last("order by channel_id desc, rand() limit 1"));
|
|
|
//季、年付卡密不存在 从月付代充卡密中获取
|
|
|
if (gptRechargeCardKey == null && gptRechargeCardKeyType == 1) {
|
|
|
- gptRechargeCardKey = gptRechargeCardKeyMapper.selectOne(Wrappers.lambdaQuery(GptRechargeCardKey.class)
|
|
|
- .eq(GptRechargeCardKey::getType, 0)
|
|
|
- .eq(GptRechargeCardKey::getStatus, Boolean.FALSE)
|
|
|
+ gptRechargeCardKey = gptRechargeCardKeyMapper.selectOne(Wrappers.lambdaQuery(GptRechargeCardKey.class)
|
|
|
+ .eq(GptRechargeCardKey::getType, 0)
|
|
|
+ .eq(GptRechargeCardKey::getStatus, Boolean.FALSE)
|
|
|
.eq(specificChannel != null, GptRechargeCardKey::getChannelId, specificChannel)
|
|
|
- .ne(specificChannel == null, GptRechargeCardKey::getChannelId, Constant.YEAR_AF_DIAN_CHANNEL_ID)
|
|
|
+ .notIn(specificChannel == null, GptRechargeCardKey::getChannelId, List.of(Constant.YEAR_AF_DIAN_CHANNEL_ID, Constant.HIBOY_PRO_ONE_CHANNEL_ID, Constant.HIBOY_PRO_TWO_CHANNEL_ID))
|
|
|
.last("order by channel_id desc, rand() limit 1"));
|
|
|
}
|
|
|
if (gptRechargeCardKey == null) {
|
|
|
@@ -373,7 +377,7 @@ public class GptProxyRechargeServiceImpl implements GptProxyRechargeService {
|
|
|
return goAfDianRechargeService.confirmRecharge(relation, gptCardKey, null);
|
|
|
}
|
|
|
//hiboy
|
|
|
- if (channelId == Constant.HIBOY_CHANNEL_ID) {
|
|
|
+ if (channelId == Constant.HIBOY_CHANNEL_ID || channelId == Constant.HIBOY_PRO_ONE_CHANNEL_ID || channelId == Constant.HIBOY_PRO_TWO_CHANNEL_ID) {
|
|
|
return hiBoyRechargeService.confirmRecharge(relation, gptCardKey, null);
|
|
|
}
|
|
|
//校验卡密是否可用
|