|
|
@@ -73,6 +73,12 @@ public class SancRechargeServiceImpl implements SancRechargeService {
|
|
|
@Override
|
|
|
public String confirmRecharge(GroupsRelation relation, String gptCardKey, CmsUser cmsUser) {
|
|
|
Long relationId = relation.getId();
|
|
|
+ if (redisService.hasKey(SAN_CHUAN_LIMIT_KEY)) {
|
|
|
+ if (cmsUser == null) {
|
|
|
+ throw BusinessRuntimeException.getInstance("系统繁忙,请稍后重试");
|
|
|
+ }
|
|
|
+ throw BusinessRuntimeException.getInstance("库存不足");
|
|
|
+ }
|
|
|
//校验卡密是否可用
|
|
|
CardVerificationResponse cardVerificationResponse = null;
|
|
|
try {
|
|
|
@@ -237,9 +243,6 @@ public class SancRechargeServiceImpl implements SancRechargeService {
|
|
|
private String submitTask(String cardKey, String accessToken) {
|
|
|
log.info("开始提交三川任务 - 卡密: {}", cardKey);
|
|
|
try {
|
|
|
- if (redisService.hasKey(SAN_CHUAN_LIMIT_KEY)) {
|
|
|
- throw BusinessRuntimeException.getInstance("库存不足");
|
|
|
- }
|
|
|
String BASE_URL = gptRechargeCardKeyChannelService.getCardKeyDomain(cardKey);
|
|
|
String url = BASE_URL + "/cards/verify-gpt";
|
|
|
JSONObject requestBody = new JSONObject();
|