|
|
@@ -196,6 +196,9 @@ public class GptProxyRechargeServiceImpl implements GptProxyRechargeService {
|
|
|
if (relation.getRechargeStatus() == GroupsRelation.RechargeStatus.recharging) {
|
|
|
throw BusinessRuntimeException.getInstance("正在充值中");
|
|
|
}
|
|
|
+ if (relation.getRechargeStatus() == GroupsRelation.RechargeStatus.recharge_error) {
|
|
|
+ throw BusinessRuntimeException.getInstance("充值失败,请联系客服开通");
|
|
|
+ }
|
|
|
int updateRemainNum = relationMapper.update(null, Wrappers.lambdaUpdate(GroupsRelation.class)
|
|
|
.set(GroupsRelation::getRechargeRemainNum, rechargeRemainNum - 1)
|
|
|
.eq(GroupsRelation::getId, relationId)
|
|
|
@@ -206,7 +209,7 @@ public class GptProxyRechargeServiceImpl implements GptProxyRechargeService {
|
|
|
}
|
|
|
OrderDon orderDon = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)
|
|
|
.in(OrderDon::getUserId, userIdList)
|
|
|
- .eq(OrderDon::getRelationId, relation)
|
|
|
+ .eq(OrderDon::getRelationId, relationId)
|
|
|
.notIn(OrderDon::getStatus, Constant.noOrderAllStatus)
|
|
|
.orderByDesc(OrderDon::getId)
|
|
|
.last("limit 1"));
|
|
|
@@ -224,7 +227,7 @@ public class GptProxyRechargeServiceImpl implements GptProxyRechargeService {
|
|
|
GptRechargeCardKey gptRechargeCardKey = gptRechargeCardKeyMapper.selectOne(Wrappers.lambdaQuery(GptRechargeCardKey.class)
|
|
|
.eq(GptRechargeCardKey::getStatus, Boolean.FALSE)
|
|
|
.last("order by rand() limit 1"));
|
|
|
- if (gptRechargeCardKey != null) {
|
|
|
+ if (gptRechargeCardKey == null) {
|
|
|
setRechargeRelationStatusAutoError(relation);
|
|
|
throw BusinessRuntimeException.getInstance("充值失败,请联系客服开通");
|
|
|
}
|