From f739b3b1a61cded9dbe5fb3952b4bbdefd7ab80f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E5=87=AF=E5=87=AF?= Date: Fri, 27 Sep 2024 15:46:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=B3=BB=E7=BB=9F=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=85=8D=E7=BD=AE=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=BA=97=E9=93=BA=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=93=BE=E6=8E=A5=E8=8E=B7=E5=8F=96=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cashier/controller/shop/ShopPayApiController.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/controller/shop/ShopPayApiController.java b/eladmin-system/src/main/java/cn/ysk/cashier/controller/shop/ShopPayApiController.java index 93f7e2dc..ce36138e 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/controller/shop/ShopPayApiController.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/controller/shop/ShopPayApiController.java @@ -3,8 +3,6 @@ package cn.ysk.cashier.controller.shop; import cn.hutool.core.map.MapProxy; import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.URLUtil; -import cn.hutool.json.JSONObject; -import cn.hutool.json.JSONUtil; import cn.ysk.cashier.exception.BadRequestException; import cn.ysk.cashier.system.enums.ParamsEnum; import cn.ysk.cashier.system.service.ParamsService; @@ -14,7 +12,6 @@ import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Value; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -39,9 +36,6 @@ public class ShopPayApiController { private final ParamsService paramsService; - @Value("${spring.profiles.active}") - private String env; - @GetMapping("getOrderPayUrl") @ApiOperation("获取店铺订单支付URL") @ApiImplicitParams({ @@ -59,9 +53,7 @@ public class ShopPayApiController { if(StrUtil.isBlank(orderId)){ throw new BadRequestException("订单id不能为空"); } - String text = paramsService.getValue(ParamsEnum.SHOP_ORDER_PAY_BASE_URL.name()); - JSONObject config = JSONUtil.parseObj(text); - String baseUrl = config.getStr(env); + String baseUrl = paramsService.getValue(ParamsEnum.SHOP_ORDER_PAY_BASE_URL.name()); String buildUrl = URLUtil.buildQuery(params, Charset.defaultCharset()); String fullUrl = baseUrl.concat("?").concat(buildUrl); return ResponseEntity.ok().body(fullUrl);