update 接口添加万车充小程序充值余额限制

This commit is contained in:
Lemon
2026-01-26 16:00:41 +08:00
parent 36f21ee13d
commit 4113473ef8
2 changed files with 9 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSON;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.jsowell.common.UserAgentUtils; import com.jsowell.common.UserAgentUtils;
import com.jsowell.common.annotation.Anonymous; import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.controller.BaseController; import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.core.redis.RedisCache; import com.jsowell.common.core.redis.RedisCache;
import com.jsowell.common.enums.adapay.AdapayPayChannelEnum; import com.jsowell.common.enums.adapay.AdapayPayChannelEnum;
@@ -275,8 +276,13 @@ public class PayController extends BaseController {
throw new BusinessException(ReturnCodeEnum.CODE_TOKEN_ERROR); throw new BusinessException(ReturnCodeEnum.CODE_TOKEN_ERROR);
} }
dto.setMemberId(memberId); dto.setMemberId(memberId);
// 判断appid看是否为万车充如果为万车充小程序直接返回不进行充值余额
String appId = request.getHeader("appId");
if (StringUtils.equals(appId, Constants.DEFAULT_APP_ID)) {
return new RestApiResponse<>(ReturnCodeEnum.CODE_FUNCTION_IS_UNAVAILABLE);
}
// 设置appId // 设置appId
dto.setWechatAppId(request.getHeader("appId")); dto.setWechatAppId(appId);
// 获取openId // 获取openId
MemberBasicInfo memberBasicInfo = memberBasicInfoService.selectInfoByMemberId(memberId); MemberBasicInfo memberBasicInfo = memberBasicInfoService.selectInfoByMemberId(memberId);
if (memberBasicInfo == null) { if (memberBasicInfo == null) {

View File

@@ -104,6 +104,8 @@ public enum ReturnCodeEnum {
CODE_MEMBER_RECHARGE_BALANCE_ERROR("00100046", "会员充值余额失败"), CODE_MEMBER_RECHARGE_BALANCE_ERROR("00100046", "会员充值余额失败"),
CODE_FUNCTION_IS_UNAVAILABLE("00100044", "功能暂不可用"),
CODE_ORDER_COMPLETE_ERROR("00100047", "该订单已经结算完成!"), CODE_ORDER_COMPLETE_ERROR("00100047", "该订单已经结算完成!"),
CODE_ADAPAY_CALLBACK_IS_NULL_ERROR("00100048", "未查询到订单支付记录回调"), CODE_ADAPAY_CALLBACK_IS_NULL_ERROR("00100048", "未查询到订单支付记录回调"),