mirror of
https://gitee.com/dromara/dax-pay
synced 2026-08-10 06:46:04 +08:00
refactor(payment): 商户前缀分域统一 /merchant/+/mch/归一为/mch/(商户端)+/admin/merchant/(运营端), 小程序/app-merchant/改/app-mch/, 清理冗余子路径, MchUserAdminController双路径, 废弃/mini/mch/**, SensitiveWord补充来源识别
This commit is contained in:
@@ -27,7 +27,7 @@ import java.util.List;
|
||||
@Validated
|
||||
@Tag(name = "商户应用配置(管理)")
|
||||
@RestController
|
||||
@RequestMapping("/admin/mch/app-info")
|
||||
@RequestMapping("/admin/merchant/app-info")
|
||||
@RequiredArgsConstructor
|
||||
public class MchAppInfoAdminController {
|
||||
private final MchAppInfoService mchAppInfoService;
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@RestController
|
||||
/// 双路径: 运营端 /admin/... 与商户端 /mch/... 共用同一 Service;
|
||||
/// 客户端隔离由网关 ClientCode + @PermCode 菜单权限保证;商户端 TenantLine 按 mchNo 行级隔离。
|
||||
@RequestMapping({"/admin/merchant/app-notify-config", "/mch/merchant/app-notify-config"})
|
||||
@RequestMapping({"/admin/merchant/app-notify-config", "/mch/app-notify-config"})
|
||||
@RequiredArgsConstructor
|
||||
public class MchAppNotifyConfigAdminController {
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Validated
|
||||
@Tag(name = "门店信息管理(管理端)")
|
||||
@RestController
|
||||
@RequestMapping("/admin/mch/store")
|
||||
@RequestMapping("/admin/merchant/store")
|
||||
@RequiredArgsConstructor
|
||||
public class MchStoreInfoAdminController {
|
||||
private final MchStoreInfoService mchStoreInfoService;
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Validated
|
||||
@Tag(name = "商户微信域名验证文件(管理)")
|
||||
@RestController
|
||||
@RequestMapping("/admin/mch/wx-verify")
|
||||
@RequestMapping("/admin/merchant/wx-verify")
|
||||
@RequiredArgsConstructor
|
||||
public class WxDomainVerifyAdminController {
|
||||
private final WxDomainVerifyService wxDomainVerifyService;
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "商户出站通知(管理)")
|
||||
@RestController
|
||||
@RequestMapping("/admin/mch-notice")
|
||||
@RequestMapping("/admin/merchant-notice")
|
||||
@RequiredArgsConstructor
|
||||
public class MchNoticeAdminController {
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Validated
|
||||
@Tag(name = "运营移动端-商户应用配置")
|
||||
@RestController
|
||||
@RequestMapping("/app-admin/mch/app-info")
|
||||
@RequestMapping("/app-admin/merchant/app-info")
|
||||
@RequiredArgsConstructor
|
||||
public class AppAdminMchAppInfoController {
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Validated
|
||||
@Tag(name = "运营移动端-门店信息管理")
|
||||
@RestController
|
||||
@RequestMapping("/app-admin/mch/store")
|
||||
@RequestMapping("/app-admin/merchant/store")
|
||||
@RequiredArgsConstructor
|
||||
public class AppAdminMchStoreInfoController {
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "商户出站通知(运营移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-admin/mch-notice")
|
||||
@RequestMapping("/app-admin/merchant-notice")
|
||||
@RequiredArgsConstructor
|
||||
public class AppAdminMchNoticeController {
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "通道商户管理(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/channel-merchant")
|
||||
@RequestMapping("/app-mch/channel-merchant")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantChannelMerchantController {
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "商户应用事件通知配置(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/merchant/app-notify-config")
|
||||
@RequestMapping("/app-mch/app-notify-config")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantAppNotifyConfigController {
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "商户API对接配置(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/merchant/credential")
|
||||
@RequestMapping("/app-mch/credential")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantCredentialController {
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.List;
|
||||
@Tag(name = "工作台交易统计(商户移动端)")
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/dashboard/trade")
|
||||
@RequestMapping("/app-mch/dashboard/trade")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantDashboardTradeController {
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.List;
|
||||
@Validated
|
||||
@Tag(name = "网关收银台配置(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/gateway/cashier-config")
|
||||
@RequestMapping("/app-mch/gateway/cashier-config")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantGatewayCashierController {
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import java.util.List;
|
||||
@Validated
|
||||
@Tag(name = "网关支付配置(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/gateway/pay-config")
|
||||
@RequestMapping("/app-mch/gateway/pay-config")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantGatewayPayConfigController {
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import java.util.List;
|
||||
@Validated
|
||||
@Tag(name = "商户应用配置(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/app-info")
|
||||
@RequestMapping("/app-mch/app-info")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantAppInfoController {
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "商户信息(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/merchant")
|
||||
@RequestMapping("/app-mch/merchant")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantInfoController {
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import java.util.Map;
|
||||
@Validated
|
||||
@Tag(name = "应用通道路由管理(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/pay-route")
|
||||
@RequestMapping("/app-mch/pay-route")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantPayRouteController {
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "门店信息管理(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/store")
|
||||
@RequestMapping("/app-mch/store")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantStoreInfoController {
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "网关支付业务单(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/order/gateway-pay")
|
||||
@RequestMapping("/app-mch/order/gateway-pay")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantGatewayPayOrderController {
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "商户出站通知(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/mch-notice")
|
||||
@RequestMapping("/app-mch/notice")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantMchNoticeController {
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "普通支付业务单(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/order/normal-pay")
|
||||
@RequestMapping("/app-mch/order/normal-pay")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantNormalPayOrderController {
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "通道入站回调记录(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/callback-record")
|
||||
@RequestMapping("/app-mch/callback-record")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantPayCallbackRecordController {
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "资金交易凭证(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/order/pay-trade")
|
||||
@RequestMapping("/app-mch/order/pay-trade")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantPayTradeController {
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "退款订单(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/order/refund")
|
||||
@RequestMapping("/app-mch/order/refund")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantRefundOrderController {
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Validated
|
||||
@Tag(name = "商户API对接配置")
|
||||
@RestController
|
||||
@RequestMapping("/merchant/credential")
|
||||
@RequestMapping("/mch/credential")
|
||||
@RequiredArgsConstructor
|
||||
public class MerchantCredentialController {
|
||||
private final MerchantCredentialService credentialService;
|
||||
|
||||
@@ -30,7 +30,9 @@ import java.util.List;
|
||||
@Validated
|
||||
@Tag(name = "商户用户管理")
|
||||
@RestController
|
||||
@RequestMapping("/merchant/user")
|
||||
/// 双路径: 运营端 /admin/merchant/user 与商户端 /mch/user 共用同一 Service;
|
||||
/// 客户端隔离由 ClientCode + @PermCode 保证;商户端 TenantLine 按 mchNo 行级隔离。
|
||||
@RequestMapping({"/admin/merchant/user", "/mch/user"})
|
||||
@RequiredArgsConstructor
|
||||
public class MchUserAdminController {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "商户信息")
|
||||
@RestController
|
||||
@RequestMapping("/merchant")
|
||||
@RequestMapping("/mch/merchant")
|
||||
@RequiredArgsConstructor
|
||||
public class MerchantController {
|
||||
private final MerchantInfoService merchantInfoService;
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@IgnoreAuth
|
||||
@Tag(name = "商户管理")
|
||||
@RestController
|
||||
@RequestMapping("/merchant/user")
|
||||
@RequestMapping("/mch/user")
|
||||
@RequiredArgsConstructor
|
||||
public class MerchantUserController {
|
||||
private final MerchantUserService merchantUserService;
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
package cn.daxpay.open.payment.merchant.controller.miniapp;
|
||||
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.dto.LabelValue;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import cn.daxpay.open.payment.merchant.result.appinfo.MchAppInfoResult;
|
||||
import cn.daxpay.open.payment.merchant.result.info.MerchantInfoResult;
|
||||
import cn.daxpay.open.payment.merchant.service.miniapp.MiniMchBasicService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/// # 小程序基础接口
|
||||
///
|
||||
@Validated
|
||||
@Tag(name = "小程序基础接口")
|
||||
@RestController
|
||||
@RequestMapping("/mini/mch")
|
||||
@RequiredArgsConstructor
|
||||
public class MiniMchBasicController {
|
||||
private final MiniMchBasicService miniAppBasicService;
|
||||
|
||||
@Operation(summary = "查询商户信息")
|
||||
@GetMapping("/find-mch-info")
|
||||
public Result<MerchantInfoResult> findMchInfo(){
|
||||
return Res.ok(miniAppBasicService.findMchInfo());
|
||||
}
|
||||
|
||||
@Operation(summary = "所有商户应用下拉列表")
|
||||
@GetMapping("/dropdown-mch-app")
|
||||
public Result<List<LabelValue>> dropdownMchApp(){
|
||||
return Res.ok(miniAppBasicService.dropdownMchApp());
|
||||
}
|
||||
|
||||
@Operation(summary = "查询默认应用")
|
||||
@GetMapping("/find-default-mch-app")
|
||||
public Result<MchAppInfoResult> findDefaultMchApp(){
|
||||
return Res.ok(miniAppBasicService.findDefaultMchApp());
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package cn.daxpay.open.payment.merchant.controller.miniapp;
|
||||
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import cn.daxpay.open.payment.trade.order.result.NormalPayOrderResult;
|
||||
import cn.daxpay.open.payment.merchant.param.miniapp.order.MiniPayOrderQuery;
|
||||
import cn.daxpay.open.payment.merchant.service.miniapp.MiniMchOrderQueryService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/// # 小程序订单查询
|
||||
///
|
||||
@Validated
|
||||
@Tag(name = "小程序订单查询")
|
||||
@RestController
|
||||
@RequestMapping("/mini/mch/order/query")
|
||||
@RequiredArgsConstructor
|
||||
public class MiniMchOrderQueryController {
|
||||
private final MiniMchOrderQueryService miniAppOrderQueryService;
|
||||
|
||||
@Operation(summary = "支付订单分页")
|
||||
@PostMapping("/page-by-pay")
|
||||
public Result<PageResult<NormalPayOrderResult>> pageByPay(@RequestBody MiniPayOrderQuery query) {
|
||||
return Res.ok(miniAppOrderQueryService.pageByPay(query));
|
||||
}
|
||||
|
||||
@Operation(summary = "支付订单详情")
|
||||
@GetMapping("/find-pay-order-by-id")
|
||||
public Result<NormalPayOrderResult> findPayOrderById(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
return Res.ok(miniAppOrderQueryService.findPayOrderById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据编号查询支付订单详情")
|
||||
@GetMapping("/find-pay-order-by-no")
|
||||
public Result<NormalPayOrderResult> findPayOrderByNo(@NotBlank(message = "{validation.field.orderNo.notBlank}") String orderNo,
|
||||
@NotBlank(message = "{validation.field.appId.notBlank}") String appId) {
|
||||
return Res.ok(miniAppOrderQueryService.findPayOrderByNo(orderNo,appId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "商户出站通知(商户端)")
|
||||
@RestController
|
||||
@RequestMapping("/mch/mch-notice")
|
||||
@RequestMapping("/mch/notice")
|
||||
@RequiredArgsConstructor
|
||||
public class MchNoticeController {
|
||||
|
||||
|
||||
@@ -167,7 +167,8 @@ public class SensitiveWordCheckService {
|
||||
if (path.startsWith("/admin/")) {
|
||||
return SensitiveWordSourceEnum.ADMIN.getCode();
|
||||
}
|
||||
if (path.startsWith("/merchant/")) {
|
||||
// 商户端: /mch/ (Web) 与 /app-mch/ (小程序) 均归 MERCHANT 来源
|
||||
if (path.startsWith("/mch/") || path.startsWith("/app-mch/")) {
|
||||
return SensitiveWordSourceEnum.MERCHANT.getCode();
|
||||
}
|
||||
if (path.startsWith("/app-admin/")) {
|
||||
|
||||
@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Validated
|
||||
@Tag(name = "易支付场景配置")
|
||||
@RestController
|
||||
@RequestMapping({"/admin/easypay/config", "/merchant/easypay/config"})
|
||||
@RequestMapping({"/admin/easypay/config", "/mch/easypay/config"})
|
||||
@RequiredArgsConstructor
|
||||
public class EasyPayConfigController {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Validated
|
||||
@Tag(name = "易支付凭证配置")
|
||||
@RestController
|
||||
@RequestMapping({"/admin/easypay/credential", "/merchant/easypay/credential"})
|
||||
@RequestMapping({"/admin/easypay/credential", "/mch/easypay/credential"})
|
||||
@RequiredArgsConstructor
|
||||
public class EasyPayCredentialController {
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "易支付协议订单(商户端)")
|
||||
@RestController
|
||||
@RequestMapping("/merchant/easypay/order")
|
||||
@RequestMapping("/mch/easypay/order")
|
||||
@RequiredArgsConstructor
|
||||
public class EasyPayOrderMchController {
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@Validated
|
||||
@Tag(name = "易支付协议退款订单(商户端)")
|
||||
@RestController
|
||||
@RequestMapping("/merchant/easypay/refund")
|
||||
@RequestMapping("/mch/easypay/refund")
|
||||
@RequiredArgsConstructor
|
||||
public class EasyPayRefundOrderMchController {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user