|
@@ -159,6 +159,10 @@ public class GptRechargeServiceImpl implements GptRechargeService {
|
|
|
if (sku.getRechargeType() == 2) {
|
|
if (sku.getRechargeType() == 2) {
|
|
|
specificChannel = 8;
|
|
specificChannel = 8;
|
|
|
subRechargeNum = 12;
|
|
subRechargeNum = 12;
|
|
|
|
|
+ }
|
|
|
|
|
+ //指定了代充渠道 直接用这个渠道 其他不能用
|
|
|
|
|
+ if (sku.getRechargeChannelId() != null) {
|
|
|
|
|
+ specificChannel = sku.getRechargeChannelId();
|
|
|
}
|
|
}
|
|
|
try {
|
|
try {
|
|
|
int updateRemainNum = relationMapper.update(null, Wrappers.lambdaUpdate(GroupsRelation.class)
|
|
int updateRemainNum = relationMapper.update(null, Wrappers.lambdaUpdate(GroupsRelation.class)
|
|
@@ -207,7 +211,7 @@ public class GptRechargeServiceImpl implements GptRechargeService {
|
|
|
.eq(GptRechargeCardKey::getStatus, Boolean.FALSE)
|
|
.eq(GptRechargeCardKey::getStatus, Boolean.FALSE)
|
|
|
.eq(GptRechargeCardKey::getType, gptRechargeCardKeyType)
|
|
.eq(GptRechargeCardKey::getType, gptRechargeCardKeyType)
|
|
|
.eq(specificChannel != null, GptRechargeCardKey::getChannelId, specificChannel)
|
|
.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"));
|
|
.last("order by channel_id desc, rand() limit 1"));
|
|
|
//季、年付卡密不存在 从月付代充卡密中获取
|
|
//季、年付卡密不存在 从月付代充卡密中获取
|
|
|
if (gptRechargeCardKey == null && gptRechargeCardKeyType == 1) {
|
|
if (gptRechargeCardKey == null && gptRechargeCardKeyType == 1) {
|
|
@@ -215,7 +219,7 @@ public class GptRechargeServiceImpl implements GptRechargeService {
|
|
|
.eq(GptRechargeCardKey::getType, 0)
|
|
.eq(GptRechargeCardKey::getType, 0)
|
|
|
.eq(GptRechargeCardKey::getStatus, Boolean.FALSE)
|
|
.eq(GptRechargeCardKey::getStatus, Boolean.FALSE)
|
|
|
.eq(specificChannel != null, GptRechargeCardKey::getChannelId, specificChannel)
|
|
.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"));
|
|
.last("order by channel_id desc, rand() limit 1"));
|
|
|
}
|
|
}
|
|
|
if (gptRechargeCardKey == null) {
|
|
if (gptRechargeCardKey == null) {
|
|
@@ -254,7 +258,7 @@ public class GptRechargeServiceImpl implements GptRechargeService {
|
|
|
return goAfDianRechargeService.confirmRecharge(relation, gptCardKey, cmsUser);
|
|
return goAfDianRechargeService.confirmRecharge(relation, gptCardKey, cmsUser);
|
|
|
}
|
|
}
|
|
|
//hiboy
|
|
//hiboy
|
|
|
- if (gptRechargeCardKey.getChannelId() == Constant.HIBOY_CHANNEL_ID) {
|
|
|
|
|
|
|
+ if (gptRechargeCardKey.getChannelId() == Constant.HIBOY_CHANNEL_ID || gptRechargeCardKey.getChannelId() == Constant.HIBOY_PRO_ONE_CHANNEL_ID || gptRechargeCardKey.getChannelId() == Constant.HIBOY_PRO_TWO_CHANNEL_ID) {
|
|
|
req.setCmsUser(cmsUser);
|
|
req.setCmsUser(cmsUser);
|
|
|
relation.setCardKey(gptCardKey);
|
|
relation.setCardKey(gptCardKey);
|
|
|
return hiBoyRechargeService.confirmRecharge(relation, gptCardKey, cmsUser);
|
|
return hiBoyRechargeService.confirmRecharge(relation, gptCardKey, cmsUser);
|