mirror of
https://gitee.com/dromara/dax-pay
synced 2026-08-10 06:46:04 +08:00
feat: 新建 daxpay-payment-app-merchant 商户移动端后端模块
仿 daxpay-payment-app-admin 薄委托层架构: - 17 个 Controller (/app-merchant/ 前缀) + 17 个 Service (透传壳) - 依赖 daxpay-payment-merchant + daxpay-payment-admin - 零新增 DTO, 全部复用 Web 商户端 param/result - daxpay-start 注册新模块依赖
This commit is contained in:
40
daxpay-payment/daxpay-payment-app-merchant/pom.xml
Normal file
40
daxpay-payment/daxpay-payment-app-merchant/pom.xml
Normal file
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>cn.daxpay.open</groupId>
|
||||
<artifactId>daxpay-payment</artifactId>
|
||||
<version>4.0.0-beta1</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>daxpay-payment-app-merchant</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<description>商户移动端(APP/小程序)支付接口;逻辑转发至 payment-merchant / payment-admin / core Service</description>
|
||||
|
||||
<dependencies>
|
||||
<!-- lombok(provided 不传递,需显式声明) -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 商户 Web 端(复用 Mch*Service 与 payment-core 传递依赖) -->
|
||||
<dependency>
|
||||
<groupId>cn.daxpay.open</groupId>
|
||||
<artifactId>daxpay-payment-merchant</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 运营管理端(复用 PayRouteConfigService / GatewayCashierConfigService / MchAppNotifyConfigService) -->
|
||||
<dependency>
|
||||
<groupId>cn.daxpay.open</groupId>
|
||||
<artifactId>daxpay-payment-admin</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,12 @@
|
||||
package cn.daxpay.open.payment.app.merchant;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
/// # 商户移动端(APP/小程序)装配入口
|
||||
///
|
||||
/// 本模块依赖 `daxpay-payment-merchant` 和 `daxpay-payment-admin`,通过 Service 转发复用商户端 / 运营端业务逻辑。
|
||||
@AutoConfiguration
|
||||
@ComponentScan
|
||||
public class DaxpayAppMerchantApp {
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.channel;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.channel.AppMerchantChannelMerchantService;
|
||||
import cn.daxpay.open.payment.merchant.param.channel.ChannelMerchantQuery;
|
||||
import cn.daxpay.open.payment.merchant.result.channel.ChannelMerchantResult;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
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;
|
||||
|
||||
/// # 通道商户管理(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的通道商户查询。业务编排委托 [AppMerchantChannelMerchantService];
|
||||
/// 商户号强制取自 PaymentContext,防越权。
|
||||
@Validated
|
||||
@Tag(name = "通道商户管理(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/channel-merchant")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantChannelMerchantController {
|
||||
|
||||
private final AppMerchantChannelMerchantService channelMerchantService;
|
||||
|
||||
@Operation(summary = "分页查询")
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<ChannelMerchantResult>> page(PageParam pageParam, ChannelMerchantQuery query) {
|
||||
return Res.ok(channelMerchantService.page(pageParam, query));
|
||||
}
|
||||
|
||||
@Operation(summary = "查询详情")
|
||||
@GetMapping("/get")
|
||||
public Result<ChannelMerchantResult> findById(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
return Res.ok(channelMerchantService.findById(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.config;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.config.AppMerchantAppNotifyConfigService;
|
||||
import cn.daxpay.open.payment.merchant.param.config.MchAppNotifyConfigParam;
|
||||
import cn.daxpay.open.payment.merchant.result.config.MchAppNotifyConfigResult;
|
||||
import cn.daxpay.open.platform.core.annotation.PermCode;
|
||||
import cn.daxpay.open.platform.core.code.PermCodes;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 商户应用事件通知配置(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的应用通知配置管理。业务编排委托 [AppMerchantAppNotifyConfigService]。
|
||||
@PermCode(menuCode = PermCodes.Merchant.NotifyConfig.MENU)
|
||||
@Validated
|
||||
@Tag(name = "商户应用事件通知配置(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/merchant/app-notify-config")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantAppNotifyConfigController {
|
||||
|
||||
private final AppMerchantAppNotifyConfigService notifyConfigService;
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "根据应用ID查询通知配置")
|
||||
@GetMapping("/get-by-app-id")
|
||||
public Result<MchAppNotifyConfigResult> findByAppId(
|
||||
@NotBlank(message = "{validation.field.appId.notBlank}") String appId) {
|
||||
return Res.ok(notifyConfigService.findByAppId(appId));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.MANAGE)
|
||||
@Operation(summary = "保存或更新通知配置")
|
||||
@PostMapping("/save-or-update")
|
||||
public Result<Void> saveOrUpdate(@RequestBody @Validated MchAppNotifyConfigParam param) {
|
||||
notifyConfigService.saveOrUpdate(param);
|
||||
return Res.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.config;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.config.AppMerchantCredentialService;
|
||||
import cn.daxpay.open.payment.merchant.param.config.MerchantCredentialParam;
|
||||
import cn.daxpay.open.payment.merchant.result.config.MerchantCredentialResult;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 商户API对接配置(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的 API 凭证管理。业务编排委托 [AppMerchantCredentialService]。
|
||||
@Validated
|
||||
@Tag(name = "商户API对接配置(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/merchant/credential")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantCredentialController {
|
||||
|
||||
private final AppMerchantCredentialService credentialService;
|
||||
|
||||
@Operation(summary = "根据商户号查询")
|
||||
@GetMapping("/get-by-mch-no")
|
||||
public Result<MerchantCredentialResult> findByMchNo(
|
||||
@NotBlank(message = "{validation.field.mchNo.notBlank}") String mchNo) {
|
||||
return Res.ok(credentialService.findByMchNo(mchNo));
|
||||
}
|
||||
|
||||
@Operation(summary = "更新商户API配置")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated MerchantCredentialParam param) {
|
||||
credentialService.update(param);
|
||||
return Res.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.dashboard;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.dashboard.AppMerchantDashboardTradeService;
|
||||
import cn.daxpay.open.payment.merchant.result.dashboard.MchDashboardHeaderCountResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.AmountRangeItemResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.DimRankItemResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.HourlyDistItemResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.ProviderDistItemResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.ProviderSuccessItemResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.RefundTrendItemResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.TradeOverviewResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.TradeTrendItemResult;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
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.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/// # 工作台交易统计(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端工作台的交易概览统计。
|
||||
/// 不挂菜单权限码: 工作台为登录即达的页面, 任何已认证商户用户均可查看。
|
||||
@Tag(name = "工作台交易统计(商户移动端)")
|
||||
@Validated
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/dashboard/trade")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantDashboardTradeController {
|
||||
|
||||
private final AppMerchantDashboardTradeService dashboardTradeService;
|
||||
|
||||
@Operation(summary = "工作台头部计数(应用/门店/通道商户)")
|
||||
@GetMapping("/header-counts")
|
||||
public Result<MchDashboardHeaderCountResult> headerCounts() {
|
||||
return Res.ok(dashboardTradeService.headerCounts());
|
||||
}
|
||||
|
||||
/// 交易概览: 支持 today/yesterday 快捷模式 + 自定义区间模式(含环比)
|
||||
@Operation(summary = "交易概览(今日/昨日或自定义区间)")
|
||||
@GetMapping("/overview")
|
||||
public Result<TradeOverviewResult> overview(
|
||||
@RequestParam(required = false) String date,
|
||||
@RequestParam(required = false) String start,
|
||||
@RequestParam(required = false) String end) {
|
||||
if (start != null && end != null) {
|
||||
return Res.ok(dashboardTradeService.overview(start, end));
|
||||
}
|
||||
return Res.ok(dashboardTradeService.overview(date != null ? date : "today"));
|
||||
}
|
||||
|
||||
@Operation(summary = "交易趋势")
|
||||
@GetMapping("/trend")
|
||||
public Result<List<TradeTrendItemResult>> trend(
|
||||
@RequestParam(defaultValue = "7") int days,
|
||||
@RequestParam(required = false) String start,
|
||||
@RequestParam(required = false) String end) {
|
||||
if (start != null && end != null) {
|
||||
return Res.ok(dashboardTradeService.trend(start, end));
|
||||
}
|
||||
return Res.ok(dashboardTradeService.trend(days));
|
||||
}
|
||||
|
||||
@Operation(summary = "退款趋势")
|
||||
@GetMapping("/refund-trend")
|
||||
public Result<List<RefundTrendItemResult>> refundTrend(
|
||||
@RequestParam(defaultValue = "7") int days,
|
||||
@RequestParam(required = false) String start,
|
||||
@RequestParam(required = false) String end) {
|
||||
if (start != null && end != null) {
|
||||
return Res.ok(dashboardTradeService.refundTrend(start, end));
|
||||
}
|
||||
return Res.ok(dashboardTradeService.refundTrend(days));
|
||||
}
|
||||
|
||||
@Operation(summary = "支付渠道分布")
|
||||
@GetMapping("/provider-dist")
|
||||
public Result<List<ProviderDistItemResult>> providerDist(
|
||||
@RequestParam(defaultValue = "30") int days,
|
||||
@RequestParam(required = false) String start,
|
||||
@RequestParam(required = false) String end) {
|
||||
if (start != null && end != null) {
|
||||
return Res.ok(dashboardTradeService.providerDist(start, end));
|
||||
}
|
||||
return Res.ok(dashboardTradeService.providerDist(days));
|
||||
}
|
||||
|
||||
@Operation(summary = "支付渠道成功率")
|
||||
@GetMapping("/provider-success")
|
||||
public Result<List<ProviderSuccessItemResult>> providerSuccess(
|
||||
@RequestParam(defaultValue = "30") int days,
|
||||
@RequestParam(required = false) String start,
|
||||
@RequestParam(required = false) String end) {
|
||||
if (start != null && end != null) {
|
||||
return Res.ok(dashboardTradeService.providerSuccess(start, end));
|
||||
}
|
||||
return Res.ok(dashboardTradeService.providerSuccess(days));
|
||||
}
|
||||
|
||||
@Operation(summary = "时段分布(日均)")
|
||||
@GetMapping("/hourly-dist")
|
||||
public Result<List<HourlyDistItemResult>> hourlyDist(
|
||||
@RequestParam(defaultValue = "7") int days,
|
||||
@RequestParam(required = false) String start,
|
||||
@RequestParam(required = false) String end) {
|
||||
if (start != null && end != null) {
|
||||
return Res.ok(dashboardTradeService.hourlyDist(start, end));
|
||||
}
|
||||
return Res.ok(dashboardTradeService.hourlyDist(days));
|
||||
}
|
||||
|
||||
@Operation(summary = "金额区间分桶")
|
||||
@GetMapping("/amount-range")
|
||||
public Result<List<AmountRangeItemResult>> amountRange(
|
||||
@RequestParam(defaultValue = "7") int days,
|
||||
@RequestParam(required = false) String start,
|
||||
@RequestParam(required = false) String end) {
|
||||
if (start != null && end != null) {
|
||||
return Res.ok(dashboardTradeService.amountRange(start, end));
|
||||
}
|
||||
return Res.ok(dashboardTradeService.amountRange(days));
|
||||
}
|
||||
|
||||
/// 维度排行: dim=channelMch|app|store
|
||||
@Operation(summary = "维度交易额排名(通道商户/应用/门店)")
|
||||
@GetMapping("/dim-rank")
|
||||
public Result<List<DimRankItemResult>> dimRank(
|
||||
@RequestParam(defaultValue = "app") String dim,
|
||||
@RequestParam(defaultValue = "7") int days,
|
||||
@RequestParam(defaultValue = "10") int limit,
|
||||
@RequestParam(required = false) String start,
|
||||
@RequestParam(required = false) String end) {
|
||||
if (start != null && end != null) {
|
||||
return Res.ok(dashboardTradeService.dimRank(dim, start, end, limit));
|
||||
}
|
||||
return Res.ok(dashboardTradeService.dimRank(dim, days, limit));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.gateway;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.gateway.AppMerchantGatewayAggregateService;
|
||||
import cn.daxpay.open.payment.merchant.param.gateway.GatewayAggregateConfigParam;
|
||||
import cn.daxpay.open.payment.merchant.result.gateway.GatewayAggregateConfigResult;
|
||||
import cn.daxpay.open.platform.core.annotation.PermCode;
|
||||
import cn.daxpay.open.platform.core.code.PermCodes;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 网关聚合扫码配置(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的聚合支付配置。业务编排委托 [AppMerchantGatewayAggregateService];
|
||||
/// 写操作强制当前上下文 mchNo,并通过 MchAppInfoService 校验应用归属。
|
||||
@PermCode(menuCode = PermCodes.Merchant.GatewayAggregate.MENU)
|
||||
@Validated
|
||||
@Tag(name = "网关聚合扫码配置(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/gateway/aggregate-config")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantGatewayAggregateController {
|
||||
|
||||
private final AppMerchantGatewayAggregateService gatewayAggregateService;
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "按应用查询聚合扫码配置")
|
||||
@GetMapping("/get-by-app-id")
|
||||
public Result<GatewayAggregateConfigResult> getByAppId(
|
||||
@NotBlank(message = "{validation.field.appId.notBlank}") String appId) {
|
||||
return Res.ok(gatewayAggregateService.findByAppId(appId));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.MANAGE)
|
||||
@Operation(summary = "保存或更新聚合扫码配置")
|
||||
@PostMapping("/save-or-update")
|
||||
public Result<Void> saveOrUpdate(@RequestBody @Validated GatewayAggregateConfigParam param) {
|
||||
gatewayAggregateService.saveOrUpdate(param);
|
||||
return Res.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.gateway;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.gateway.AppMerchantGatewayCashierService;
|
||||
import cn.daxpay.open.payment.merchant.param.gateway.GatewayCashierItemParam;
|
||||
import cn.daxpay.open.payment.merchant.result.gateway.GatewayCashierItemResult;
|
||||
import cn.daxpay.open.platform.core.annotation.PermCode;
|
||||
import cn.daxpay.open.platform.core.code.PermCodes;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import cn.daxpay.open.platform.core.util.ValidationUtil;
|
||||
import cn.daxpay.open.platform.core.validation.ValidationGroup;
|
||||
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.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/// # 网关收银台配置(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的收银台支付项管理。业务编排委托 [AppMerchantGatewayCashierService]。
|
||||
@PermCode(menuCode = PermCodes.Merchant.GatewayCashier.MENU)
|
||||
@Validated
|
||||
@Tag(name = "网关收银台配置(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/gateway/cashier-config")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantGatewayCashierController {
|
||||
|
||||
private final AppMerchantGatewayCashierService gatewayCashierService;
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "按应用与分桶查询收银台支付项列表")
|
||||
@GetMapping("/list")
|
||||
public Result<List<GatewayCashierItemResult>> list(
|
||||
@NotBlank(message = "{validation.field.appId.notBlank}") String appId,
|
||||
@NotBlank(message = "{validation.field.cashierType.notBlank}") String cashierType,
|
||||
String clientEnv) {
|
||||
return Res.ok(gatewayCashierService.list(appId, cashierType, clientEnv));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.MANAGE)
|
||||
@Operation(summary = "新建收银台支付项")
|
||||
@PostMapping("/save")
|
||||
public Result<Void> save(@RequestBody @Validated GatewayCashierItemParam param) {
|
||||
gatewayCashierService.save(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.MANAGE)
|
||||
@Operation(summary = "更新收银台支付项")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) GatewayCashierItemParam param) {
|
||||
// 同时校验 Default 分组字段与 edit 分组主键
|
||||
ValidationUtil.validateParam(param, jakarta.validation.groups.Default.class, ValidationGroup.edit.class);
|
||||
gatewayCashierService.update(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.MANAGE)
|
||||
@Operation(summary = "删除收银台支付项")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
gatewayCashierService.delete(id);
|
||||
return Res.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.gateway;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.gateway.AppMerchantGatewayCodeConfigService;
|
||||
import cn.daxpay.open.payment.merchant.param.gateway.GatewayCodeConfigParam;
|
||||
import cn.daxpay.open.payment.merchant.result.gateway.GatewayCodeConfigResult;
|
||||
import cn.daxpay.open.platform.core.annotation.PermCode;
|
||||
import cn.daxpay.open.platform.core.code.PermCodes;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.dto.ChannelMchOption;
|
||||
import cn.daxpay.open.platform.core.rest.dto.LabelValue;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/// # 码牌支付策略配置(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的码牌支付配置。业务编排委托 [AppMerchantGatewayCodeConfigService];
|
||||
/// 写操作强制当前上下文 mchNo,并通过 MchAppInfoService 校验应用归属。
|
||||
@PermCode(menuCode = PermCodes.Merchant.GatewayCode.MENU)
|
||||
@Validated
|
||||
@Tag(name = "码牌支付策略配置(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/gateway/code-config")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantGatewayCodeConfigController {
|
||||
|
||||
private final AppMerchantGatewayCodeConfigService gatewayCodeConfigService;
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "按应用查询码牌支付配置")
|
||||
@GetMapping("/get-by-app-id")
|
||||
public Result<GatewayCodeConfigResult> getByAppId(
|
||||
@NotBlank(message = "{validation.field.appId.notBlank}") String appId) {
|
||||
return Res.ok(gatewayCodeConfigService.findByAppId(appId));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.MANAGE)
|
||||
@Operation(summary = "保存或更新码牌支付配置")
|
||||
@PostMapping("/save-or-update")
|
||||
public Result<Void> saveOrUpdate(@RequestBody @Validated GatewayCodeConfigParam param) {
|
||||
gatewayCodeConfigService.saveOrUpdate(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
/// DIRECT 模式: 按当前商户+支付渠道列通道商户
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "直接指定-通道商户候选")
|
||||
@GetMapping("/direct-channel-mch-candidates")
|
||||
public Result<List<ChannelMchOption>> listDirectChannelMchCandidates(
|
||||
@NotBlank(message = "{validation.field.provider.notBlank}") String provider) {
|
||||
return Res.ok(gatewayCodeConfigService.listDirectChannelMchCandidates(provider));
|
||||
}
|
||||
|
||||
/// DIRECT 模式: 按通道商户列全部已挂载支付能力
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "直接指定-支付能力候选")
|
||||
@GetMapping("/direct-capability-candidates")
|
||||
public Result<List<LabelValue>> listDirectCapabilityCandidates(
|
||||
@NotBlank(message = "{validation.field.channelMchNo.notBlank}") String channelMchNo) {
|
||||
return Res.ok(gatewayCodeConfigService.listDirectCapabilityCandidates(channelMchNo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.info;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.info.AppMerchantAppInfoService;
|
||||
import cn.daxpay.open.payment.merchant.param.appinfo.MchAppInfoParam;
|
||||
import cn.daxpay.open.payment.merchant.param.appinfo.MchAppInfoQuery;
|
||||
import cn.daxpay.open.payment.merchant.result.appinfo.MchAppInfoResult;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import cn.daxpay.open.platform.core.validation.ValidationGroup;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/// # 商户应用配置(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的应用管理。业务编排委托 [AppMerchantAppInfoService]。
|
||||
@Validated
|
||||
@Tag(name = "商户应用配置(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/app-info")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantAppInfoController {
|
||||
|
||||
private final AppMerchantAppInfoService appInfoService;
|
||||
|
||||
@Operation(summary = "商户应用分页")
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<MchAppInfoResult>> page(PageParam pageParam, MchAppInfoQuery query) {
|
||||
return Res.ok(appInfoService.page(pageParam, query));
|
||||
}
|
||||
|
||||
@Operation(summary = "商户应用列表")
|
||||
@GetMapping("/list")
|
||||
public Result<List<MchAppInfoResult>> list() {
|
||||
return Res.ok(appInfoService.list());
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询商户应用")
|
||||
@GetMapping("/get")
|
||||
public Result<MchAppInfoResult> findById(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
return Res.ok(appInfoService.findById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据应用AppId获取应用详情")
|
||||
@GetMapping("/get-by-app-id")
|
||||
public Result<MchAppInfoResult> findByAppId(@NotNull(message = "{validation.field.appId.notBlank}") String appId) {
|
||||
return Res.ok(appInfoService.findByAppId(appId));
|
||||
}
|
||||
|
||||
@Operation(summary = "新增商户应用")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) MchAppInfoParam param) {
|
||||
appInfoService.add(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "修改商户应用")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) MchAppInfoParam param) {
|
||||
appInfoService.update(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "删除商户应用")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
appInfoService.delete(id);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "设置默认商户应用")
|
||||
@PostMapping("/set-default")
|
||||
public Result<Void> setDefault(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
appInfoService.setDefault(id);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "取消默认商户应用")
|
||||
@PostMapping("/clear-default")
|
||||
public Result<Void> clearDefault(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
appInfoService.clearDefault(id);
|
||||
return Res.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.info;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.info.AppMerchantInfoService;
|
||||
import cn.daxpay.open.payment.merchant.param.info.MerchantInfoParam;
|
||||
import cn.daxpay.open.payment.merchant.result.info.MerchantInfoResult;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
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.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 商户信息(商户移动端)
|
||||
///
|
||||
/// 获取/更新当前登录商户资料。业务编排委托 [AppMerchantInfoService]。
|
||||
@Validated
|
||||
@Tag(name = "商户信息(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/merchant")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantInfoController {
|
||||
|
||||
private final AppMerchantInfoService merchantInfoService;
|
||||
|
||||
@Operation(summary = "获取商户信息")
|
||||
@GetMapping("/get")
|
||||
public Result<MerchantInfoResult> getMerchant() {
|
||||
return Res.ok(merchantInfoService.getMerchant());
|
||||
}
|
||||
|
||||
/// 更新当前登录商户资料(mchNo 取自 PaymentContext,不信任入参)
|
||||
@Operation(summary = "更新商户信息")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated MerchantInfoParam param) {
|
||||
merchantInfoService.update(param);
|
||||
return Res.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.route;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.route.AppMerchantPayRouteService;
|
||||
import cn.daxpay.open.payment.masterdata.result.provider.PayProviderMethodResult;
|
||||
import cn.daxpay.open.payment.route.param.basic.PayRouteBasicConfigBatchParam;
|
||||
import cn.daxpay.open.payment.route.param.scene.PayRouteSceneCapabilityBatchParam;
|
||||
import cn.daxpay.open.payment.route.param.scene.PayRouteSceneConfigBatchParam;
|
||||
import cn.daxpay.open.payment.route.param.strategy.PayRouteStrategyParam;
|
||||
import cn.daxpay.open.platform.core.annotation.PermCode;
|
||||
import cn.daxpay.open.platform.core.code.PermCodes;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.dto.ChannelMchOption;
|
||||
import cn.daxpay.open.platform.core.rest.dto.LabelValue;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import cn.daxpay.open.payment.route.result.basic.PayRouteBasicConfigResult;
|
||||
import cn.daxpay.open.payment.route.result.scene.PayRouteSceneConfigResult;
|
||||
import cn.daxpay.open.payment.route.result.strategy.PayRouteStrategyResult;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/// # 商户应用通道路由(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的通道路由配置。业务编排委托 [AppMerchantPayRouteService]。
|
||||
@PermCode(menuCode = PermCodes.Merchant.AppRoute.MENU)
|
||||
@Validated
|
||||
@Tag(name = "应用通道路由管理(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/pay-route")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantPayRouteController {
|
||||
|
||||
private final AppMerchantPayRouteService payRouteService;
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "已启用渠道支付方式扁平列表")
|
||||
@GetMapping("/method-directory/flat-list")
|
||||
public Result<List<PayProviderMethodResult>> listMethodDirectoryFlat() {
|
||||
return Res.ok(payRouteService.listMethodDirectoryFlat());
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "获取或初始化应用路由策略")
|
||||
@GetMapping("/strategy/get-or-init-by-app-id")
|
||||
public Result<PayRouteStrategyResult> getOrInitByAppId(
|
||||
@NotBlank(message = "{validation.field.appId.notBlank}") String appId) {
|
||||
return Res.ok(payRouteService.getOrInitByAppId(appId));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.MANAGE)
|
||||
@Operation(summary = "更新路由策略")
|
||||
@PostMapping("/strategy/update")
|
||||
public Result<PayRouteStrategyResult> updateStrategy(@RequestBody @Validated PayRouteStrategyParam param) {
|
||||
return Res.ok(payRouteService.updateStrategy(param));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "查询场景模式配置列表")
|
||||
@GetMapping("/scene-config/list-by-app-id")
|
||||
public Result<List<PayRouteSceneConfigResult>> listSceneByAppId(
|
||||
@NotBlank(message = "{validation.field.appId.notBlank}") String appId) {
|
||||
return Res.ok(payRouteService.listSceneByAppId(appId));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.MANAGE)
|
||||
@Operation(summary = "批量保存场景模式配置")
|
||||
@PostMapping("/scene-config/save-batch")
|
||||
public Result<Void> saveSceneBatch(@RequestBody @Validated PayRouteSceneConfigBatchParam param) {
|
||||
payRouteService.saveSceneBatch(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "通道路由白名单目录下全部通道商户候选(批量)")
|
||||
@GetMapping("/scene-config/channel-mh-candidates-batch")
|
||||
public Result<Map<String, List<ChannelMchOption>>> listSceneChannelMhCandidatesBatch(
|
||||
@NotBlank(message = "{validation.field.appId.notBlank}") String appId) {
|
||||
return Res.ok(payRouteService.listSceneChannelMhCandidatesBatch(appId));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "按目录项与通道商户批量返回支付能力候选")
|
||||
@PostMapping("/scene-config/capability-candidates-batch")
|
||||
public Result<Map<String, List<LabelValue>>> listSceneCapabilityCandidatesBatch(
|
||||
@Valid @RequestBody PayRouteSceneCapabilityBatchParam param) {
|
||||
return Res.ok(payRouteService.listSceneCapabilityCandidatesBatch(param));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "目录项下商户已开通的通道商户候选")
|
||||
@GetMapping("/scene-config/channel-mh-candidates")
|
||||
public Result<List<ChannelMchOption>> listSceneChannelMhCandidates(
|
||||
@NotBlank(message = "{validation.field.appId.notBlank}") String appId,
|
||||
@NotBlank(message = "{validation.field.provider.notBlank}") String provider,
|
||||
@NotBlank(message = "{validation.field.method.notBlank}") String method) {
|
||||
return Res.ok(payRouteService.listSceneChannelMhCandidates(appId, provider, method));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "目录项与通道商户下支付能力候选")
|
||||
@GetMapping("/scene-config/capability-candidates")
|
||||
public Result<List<LabelValue>> listSceneCapabilityCandidates(
|
||||
@NotBlank(message = "{validation.field.appId.notBlank}") String appId,
|
||||
@NotBlank(message = "{validation.field.provider.notBlank}") String provider,
|
||||
@NotBlank(message = "{validation.field.method.notBlank}") String method,
|
||||
@NotBlank(message = "{validation.field.channelMchNo.notBlank}") String channelMchNo) {
|
||||
return Res.ok(payRouteService.listSceneCapabilityCandidates(appId, provider, method, channelMchNo));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "查询基础模式配置列表")
|
||||
@GetMapping("/basic-config/list-by-app-id")
|
||||
public Result<List<PayRouteBasicConfigResult>> listBasicByAppId(
|
||||
@NotBlank(message = "{validation.field.appId.notBlank}") String appId) {
|
||||
return Res.ok(payRouteService.listBasicByAppId(appId));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.MANAGE)
|
||||
@Operation(summary = "批量保存基础模式配置")
|
||||
@PostMapping("/basic-config/save-batch")
|
||||
public Result<Void> saveBasicBatch(@RequestBody @Validated PayRouteBasicConfigBatchParam param) {
|
||||
payRouteService.saveBasicBatch(param);
|
||||
return Res.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.store;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.store.AppMerchantStoreInfoService;
|
||||
import cn.daxpay.open.payment.merchant.param.store.MchStoreInfoParam;
|
||||
import cn.daxpay.open.payment.merchant.param.store.MchStoreInfoQuery;
|
||||
import cn.daxpay.open.payment.merchant.result.store.MchStoreInfoResult;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import cn.daxpay.open.platform.core.validation.ValidationGroup;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/// # 门店信息管理(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的门店管理。业务编排委托 [AppMerchantStoreInfoService]。
|
||||
@Validated
|
||||
@Tag(name = "门店信息管理(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/store")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantStoreInfoController {
|
||||
|
||||
private final AppMerchantStoreInfoService storeInfoService;
|
||||
|
||||
@Operation(summary = "门店分页")
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<MchStoreInfoResult>> page(PageParam pageParam, MchStoreInfoQuery query) {
|
||||
return Res.ok(storeInfoService.page(pageParam, query));
|
||||
}
|
||||
|
||||
@Operation(summary = "根据id查询门店")
|
||||
@GetMapping("/get")
|
||||
public Result<MchStoreInfoResult> findById(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
return Res.ok(storeInfoService.findById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "新增门店")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) MchStoreInfoParam param) {
|
||||
storeInfoService.add(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "修改门店")
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody @Validated(ValidationGroup.edit.class) MchStoreInfoParam param) {
|
||||
storeInfoService.update(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@Operation(summary = "删除门店")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
storeInfoService.delete(id);
|
||||
return Res.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.trade;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.trade.AppMerchantGatewayPayOrderService;
|
||||
import cn.daxpay.open.payment.trade.order.param.GatewayPayOrderQuery;
|
||||
import cn.daxpay.open.payment.trade.order.result.GatewayPayOrderResult;
|
||||
import cn.daxpay.open.platform.core.annotation.PermCode;
|
||||
import cn.daxpay.open.platform.core.code.PermCodes;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
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;
|
||||
|
||||
/// # 网关支付业务单(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的网关支付订单查询。业务编排委托 [AppMerchantGatewayPayOrderService]。
|
||||
@PermCode(menuCode = PermCodes.Trade.GatewayOrder.MENU)
|
||||
@Validated
|
||||
@Tag(name = "网关支付业务单(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/order/gateway-pay")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantGatewayPayOrderController {
|
||||
|
||||
private final AppMerchantGatewayPayOrderService gatewayPayOrderService;
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "网关支付业务单分页")
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<GatewayPayOrderResult>> page(PageParam pageParam, GatewayPayOrderQuery query) {
|
||||
return Res.ok(gatewayPayOrderService.page(pageParam, query));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "根据ID查询详情")
|
||||
@GetMapping("/get-by-id")
|
||||
public Result<GatewayPayOrderResult> findById(
|
||||
@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
return Res.ok(gatewayPayOrderService.findById(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.trade;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.trade.AppMerchantMchNoticeService;
|
||||
import cn.daxpay.open.payment.trade.notice.param.MchNoticeTaskQuery;
|
||||
import cn.daxpay.open.payment.trade.notice.result.MchNoticeTaskResult;
|
||||
import cn.daxpay.open.platform.core.annotation.PermCode;
|
||||
import cn.daxpay.open.platform.core.code.PermCodes;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
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;
|
||||
|
||||
/// # 商户出站通知(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的出站通知查询。业务编排委托 [AppMerchantMchNoticeService]。
|
||||
@PermCode(menuCode = PermCodes.Trade.Notice.MENU)
|
||||
@Validated
|
||||
@Tag(name = "商户出站通知(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/mch-notice")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantMchNoticeController {
|
||||
|
||||
private final AppMerchantMchNoticeService mchNoticeService;
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "通知任务分页")
|
||||
@GetMapping("/task/page")
|
||||
public Result<PageResult<MchNoticeTaskResult>> pageTask(PageParam pageParam, MchNoticeTaskQuery query) {
|
||||
return Res.ok(mchNoticeService.pageTask(pageParam, query));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "通知任务详情")
|
||||
@GetMapping("/task/get-by-id")
|
||||
public Result<MchNoticeTaskResult> getTaskById(
|
||||
@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
return Res.ok(mchNoticeService.findTaskById(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.trade;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.trade.AppMerchantNormalPayOrderService;
|
||||
import cn.daxpay.open.payment.trade.order.param.NormalPayOrderQuery;
|
||||
import cn.daxpay.open.payment.trade.order.result.NormalPayOrderResult;
|
||||
import cn.daxpay.open.platform.core.annotation.PermCode;
|
||||
import cn.daxpay.open.platform.core.code.PermCodes;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
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;
|
||||
|
||||
/// # 普通支付业务单(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的业务订单查询。业务编排委托 [AppMerchantNormalPayOrderService]。
|
||||
@PermCode(menuCode = PermCodes.Trade.Order.MENU)
|
||||
@Validated
|
||||
@Tag(name = "普通支付业务单(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/order/normal-pay")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantNormalPayOrderController {
|
||||
|
||||
private final AppMerchantNormalPayOrderService normalPayOrderService;
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "普通支付业务单分页")
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<NormalPayOrderResult>> page(PageParam pageParam, NormalPayOrderQuery query) {
|
||||
return Res.ok(normalPayOrderService.page(pageParam, query));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "根据ID查询普通支付业务单详情")
|
||||
@GetMapping("/get-by-id")
|
||||
public Result<NormalPayOrderResult> findById(
|
||||
@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
return Res.ok(normalPayOrderService.findById(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.trade;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.trade.AppMerchantPayCallbackRecordService;
|
||||
import cn.daxpay.open.payment.trade.record.param.PayCallbackRecordQuery;
|
||||
import cn.daxpay.open.payment.trade.record.result.PayCallbackRecordResult;
|
||||
import cn.daxpay.open.platform.core.annotation.PermCode;
|
||||
import cn.daxpay.open.platform.core.code.PermCodes;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
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;
|
||||
|
||||
/// # 通道入站回调记录(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的通道回调记录查询。业务编排委托 [AppMerchantPayCallbackRecordService]。
|
||||
@PermCode(menuCode = PermCodes.Trade.CallbackRecord.MENU)
|
||||
@Validated
|
||||
@Tag(name = "通道入站回调记录(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/callback-record")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantPayCallbackRecordController {
|
||||
|
||||
private final AppMerchantPayCallbackRecordService payCallbackRecordService;
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "回调记录分页")
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<PayCallbackRecordResult>> page(PageParam pageParam, PayCallbackRecordQuery query) {
|
||||
return Res.ok(payCallbackRecordService.page(pageParam, query));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "回调记录详情")
|
||||
@GetMapping("/get-by-id")
|
||||
public Result<PayCallbackRecordResult> findById(
|
||||
@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
return Res.ok(payCallbackRecordService.findById(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.trade;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.trade.AppMerchantPayTradeService;
|
||||
import cn.daxpay.open.payment.trade.order.param.PayTradeQuery;
|
||||
import cn.daxpay.open.payment.trade.order.result.PayTradeResult;
|
||||
import cn.daxpay.open.platform.core.annotation.PermCode;
|
||||
import cn.daxpay.open.platform.core.code.PermCodes;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
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;
|
||||
|
||||
/// # 资金交易凭证(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的资金交易凭证查询。业务编排委托 [AppMerchantPayTradeService]。
|
||||
@PermCode(menuCode = PermCodes.Trade.Fund.MENU)
|
||||
@Validated
|
||||
@Tag(name = "资金交易凭证(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/order/pay-trade")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantPayTradeController {
|
||||
|
||||
private final AppMerchantPayTradeService payTradeService;
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "资金交易凭证分页")
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<PayTradeResult>> page(PageParam pageParam, PayTradeQuery query) {
|
||||
return Res.ok(payTradeService.page(pageParam, query));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "根据ID查询资金交易凭证详情")
|
||||
@GetMapping("/get-by-id")
|
||||
public Result<PayTradeResult> findById(
|
||||
@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
return Res.ok(payTradeService.findById(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package cn.daxpay.open.payment.app.merchant.controller.trade;
|
||||
|
||||
import cn.daxpay.open.payment.app.merchant.service.trade.AppMerchantRefundOrderService;
|
||||
import cn.daxpay.open.payment.trade.order.param.RefundOrderQuery;
|
||||
import cn.daxpay.open.payment.trade.order.result.RefundOrderResult;
|
||||
import cn.daxpay.open.platform.core.annotation.PermCode;
|
||||
import cn.daxpay.open.platform.core.code.PermCodes;
|
||||
import cn.daxpay.open.platform.core.rest.Res;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import cn.daxpay.open.platform.core.rest.result.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
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;
|
||||
|
||||
/// # 退款订单(商户移动端)
|
||||
///
|
||||
/// 面向商户移动端的退款订单查询。业务编排委托 [AppMerchantRefundOrderService]。
|
||||
@PermCode(menuCode = PermCodes.Trade.Refund.MENU)
|
||||
@Validated
|
||||
@Tag(name = "退款订单(商户移动端)")
|
||||
@RestController
|
||||
@RequestMapping("/app-merchant/order/refund")
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantRefundOrderController {
|
||||
|
||||
private final AppMerchantRefundOrderService refundOrderService;
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "退款订单分页")
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<RefundOrderResult>> page(PageParam pageParam, RefundOrderQuery query) {
|
||||
return Res.ok(refundOrderService.page(pageParam, query));
|
||||
}
|
||||
|
||||
@PermCode(code = PermCodes.Action.VIEW)
|
||||
@Operation(summary = "根据ID查询退款订单详情")
|
||||
@GetMapping("/get-by-id")
|
||||
public Result<RefundOrderResult> findById(
|
||||
@NotNull(message = "{validation.field.id.notNull}") Long id) {
|
||||
return Res.ok(refundOrderService.findById(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.channel;
|
||||
|
||||
import cn.daxpay.open.payment.common.context.PaymentContext;
|
||||
import cn.daxpay.open.payment.merchant.param.channel.ChannelMerchantQuery;
|
||||
import cn.daxpay.open.payment.merchant.result.channel.ChannelMerchantResult;
|
||||
import cn.daxpay.open.payment.merchant.service.channel.ChannelMerchantService;
|
||||
import cn.daxpay.open.platform.core.code.CommonCode;
|
||||
import cn.daxpay.open.platform.core.exception.BizInfoException;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/// # 商户移动端-通道商户服务
|
||||
///
|
||||
/// 转发至 core [ChannelMerchantService];强制当前上下文 mchNo 过滤。
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantChannelMerchantService {
|
||||
|
||||
private final ChannelMerchantService channelMerchantService;
|
||||
private final PaymentContext paymentContext;
|
||||
|
||||
/// 当前登录商户号
|
||||
private String requireMchNo() {
|
||||
String mchNo = paymentContext.getMchNo();
|
||||
if (mchNo == null || mchNo.isBlank()) {
|
||||
// 商户上下文缺失
|
||||
throw new BizInfoException(CommonCode.FAIL_CODE, "pay.error.assist.mchContextMissing");
|
||||
}
|
||||
return mchNo;
|
||||
}
|
||||
|
||||
/// 分页查询(强制当前商户)
|
||||
public PageResult<ChannelMerchantResult> page(PageParam pageParam, ChannelMerchantQuery query) {
|
||||
// 强制当前商户,忽略客户端传入的 mchNo
|
||||
query.setMchNo(requireMchNo());
|
||||
return channelMerchantService.page(pageParam, query);
|
||||
}
|
||||
|
||||
/// 查询详情
|
||||
public ChannelMerchantResult findById(Long id) {
|
||||
return channelMerchantService.findById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.config;
|
||||
|
||||
import cn.daxpay.open.payment.admin.service.merchant.config.MchAppNotifyConfigService;
|
||||
import cn.daxpay.open.payment.merchant.param.config.MchAppNotifyConfigParam;
|
||||
import cn.daxpay.open.payment.merchant.result.config.MchAppNotifyConfigResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/// # 商户移动端-应用事件通知配置服务
|
||||
///
|
||||
/// 转发至 [MchAppNotifyConfigService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantAppNotifyConfigService {
|
||||
|
||||
private final MchAppNotifyConfigService mchAppNotifyConfigService;
|
||||
|
||||
/// 根据应用ID查询通知配置
|
||||
public MchAppNotifyConfigResult findByAppId(String appId) {
|
||||
return mchAppNotifyConfigService.findByAppId(appId);
|
||||
}
|
||||
|
||||
/// 保存或更新通知配置
|
||||
public void saveOrUpdate(MchAppNotifyConfigParam param) {
|
||||
mchAppNotifyConfigService.saveOrUpdate(param);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.config;
|
||||
|
||||
import cn.daxpay.open.payment.merchant.param.config.MerchantCredentialParam;
|
||||
import cn.daxpay.open.payment.merchant.result.config.MerchantCredentialResult;
|
||||
import cn.daxpay.open.payment.merchant.service.config.MerchantCredentialService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/// # 商户移动端-对接凭证服务
|
||||
///
|
||||
/// 转发至 core [MerchantCredentialService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantCredentialService {
|
||||
|
||||
private final MerchantCredentialService credentialService;
|
||||
|
||||
/// 根据商户号查询
|
||||
public MerchantCredentialResult findByMchNo(String mchNo) {
|
||||
return credentialService.findByMchNo(mchNo);
|
||||
}
|
||||
|
||||
/// 更新商户API配置
|
||||
public void update(MerchantCredentialParam param) {
|
||||
credentialService.update(param);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.dashboard;
|
||||
|
||||
import cn.daxpay.open.payment.merchant.result.dashboard.MchDashboardHeaderCountResult;
|
||||
import cn.daxpay.open.payment.merchant.service.dashboard.MchDashboardTradeService;
|
||||
import cn.daxpay.open.payment.trade.report.result.AmountRangeItemResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.DimRankItemResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.HourlyDistItemResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.ProviderDistItemResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.ProviderSuccessItemResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.RefundTrendItemResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.TradeOverviewResult;
|
||||
import cn.daxpay.open.payment.trade.report.result.TradeTrendItemResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/// # 商户移动端-工作台交易统计服务
|
||||
///
|
||||
/// 转发至 [MchDashboardTradeService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantDashboardTradeService {
|
||||
|
||||
private final MchDashboardTradeService mchDashboardTradeService;
|
||||
|
||||
/// 工作台头部计数
|
||||
public MchDashboardHeaderCountResult headerCounts() {
|
||||
return mchDashboardTradeService.headerCounts();
|
||||
}
|
||||
|
||||
/// 交易概览(快捷模式:today / yesterday)
|
||||
public TradeOverviewResult overview(String date) {
|
||||
return mchDashboardTradeService.overview(date);
|
||||
}
|
||||
|
||||
/// 交易概览(区间模式)
|
||||
public TradeOverviewResult overview(String start, String end) {
|
||||
return mchDashboardTradeService.overview(start, end);
|
||||
}
|
||||
|
||||
/// 交易趋势(快捷天数)
|
||||
public List<TradeTrendItemResult> trend(int days) {
|
||||
return mchDashboardTradeService.trend(days);
|
||||
}
|
||||
|
||||
/// 交易趋势(区间模式)
|
||||
public List<TradeTrendItemResult> trend(String start, String end) {
|
||||
return mchDashboardTradeService.trend(start, end);
|
||||
}
|
||||
|
||||
/// 退款趋势(快捷天数)
|
||||
public List<RefundTrendItemResult> refundTrend(int days) {
|
||||
return mchDashboardTradeService.refundTrend(days);
|
||||
}
|
||||
|
||||
/// 退款趋势(区间模式)
|
||||
public List<RefundTrendItemResult> refundTrend(String start, String end) {
|
||||
return mchDashboardTradeService.refundTrend(start, end);
|
||||
}
|
||||
|
||||
/// 支付渠道分布(快捷天数)
|
||||
public List<ProviderDistItemResult> providerDist(int days) {
|
||||
return mchDashboardTradeService.providerDist(days);
|
||||
}
|
||||
|
||||
/// 支付渠道分布(区间模式)
|
||||
public List<ProviderDistItemResult> providerDist(String start, String end) {
|
||||
return mchDashboardTradeService.providerDist(start, end);
|
||||
}
|
||||
|
||||
/// 支付渠道成功率(快捷天数)
|
||||
public List<ProviderSuccessItemResult> providerSuccess(int days) {
|
||||
return mchDashboardTradeService.providerSuccess(days);
|
||||
}
|
||||
|
||||
/// 支付渠道成功率(区间模式)
|
||||
public List<ProviderSuccessItemResult> providerSuccess(String start, String end) {
|
||||
return mchDashboardTradeService.providerSuccess(start, end);
|
||||
}
|
||||
|
||||
/// 时段分布(快捷天数)
|
||||
public List<HourlyDistItemResult> hourlyDist(int days) {
|
||||
return mchDashboardTradeService.hourlyDist(days);
|
||||
}
|
||||
|
||||
/// 时段分布(区间模式)
|
||||
public List<HourlyDistItemResult> hourlyDist(String start, String end) {
|
||||
return mchDashboardTradeService.hourlyDist(start, end);
|
||||
}
|
||||
|
||||
/// 金额区间分桶(快捷天数)
|
||||
public List<AmountRangeItemResult> amountRange(int days) {
|
||||
return mchDashboardTradeService.amountRange(days);
|
||||
}
|
||||
|
||||
/// 金额区间分桶(区间模式)
|
||||
public List<AmountRangeItemResult> amountRange(String start, String end) {
|
||||
return mchDashboardTradeService.amountRange(start, end);
|
||||
}
|
||||
|
||||
/// 维度排行(快捷天数)
|
||||
public List<DimRankItemResult> dimRank(String dim, int days, int limit) {
|
||||
return mchDashboardTradeService.dimRank(dim, days, limit);
|
||||
}
|
||||
|
||||
/// 维度排行(区间模式)
|
||||
public List<DimRankItemResult> dimRank(String dim, String start, String end, int limit) {
|
||||
return mchDashboardTradeService.dimRank(dim, start, end, limit);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.gateway;
|
||||
|
||||
import cn.daxpay.open.payment.common.context.PaymentContext;
|
||||
import cn.daxpay.open.payment.merchant.param.gateway.GatewayAggregateConfigParam;
|
||||
import cn.daxpay.open.payment.merchant.result.appinfo.MchAppInfoResult;
|
||||
import cn.daxpay.open.payment.merchant.result.gateway.GatewayAggregateConfigResult;
|
||||
import cn.daxpay.open.payment.merchant.service.appinfo.MchAppInfoService;
|
||||
import cn.daxpay.open.payment.merchant.service.gateway.GatewayAggregateConfigService;
|
||||
import cn.daxpay.open.platform.core.code.CommonCode;
|
||||
import cn.daxpay.open.platform.core.exception.BizInfoException;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/// # 商户移动端-聚合扫码配置服务
|
||||
///
|
||||
/// 转发至 core [GatewayAggregateConfigService];写操作强制当前上下文 mchNo。
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantGatewayAggregateService {
|
||||
|
||||
private final GatewayAggregateConfigService gatewayAggregateConfigService;
|
||||
private final MchAppInfoService mchAppInfoService;
|
||||
private final PaymentContext paymentContext;
|
||||
|
||||
/// 当前登录商户号
|
||||
private String requireMchNo() {
|
||||
String mchNo = paymentContext.getMchNo();
|
||||
if (mchNo == null || mchNo.isBlank()) {
|
||||
// 商户上下文缺失
|
||||
throw new BizInfoException(CommonCode.FAIL_CODE, "pay.error.assist.mchContextMissing");
|
||||
}
|
||||
return mchNo;
|
||||
}
|
||||
|
||||
/// 按应用查询聚合配置
|
||||
public GatewayAggregateConfigResult findByAppId(String appId) {
|
||||
// 校验 appId 属于当前商户
|
||||
mchAppInfoService.findByAppId(appId);
|
||||
return gatewayAggregateConfigService.findByAppId(appId);
|
||||
}
|
||||
|
||||
/// 保存或更新聚合配置
|
||||
public void saveOrUpdate(GatewayAggregateConfigParam param) {
|
||||
MchAppInfoResult app = mchAppInfoService.findByAppId(param.getAppId());
|
||||
// 强制当前商户号,忽略客户端传入
|
||||
param.setMchNo(app.getMchNo() != null ? app.getMchNo() : requireMchNo());
|
||||
gatewayAggregateConfigService.saveOrUpdate(param);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.gateway;
|
||||
|
||||
import cn.daxpay.open.payment.admin.service.merchant.gateway.GatewayCashierConfigService;
|
||||
import cn.daxpay.open.payment.merchant.param.gateway.GatewayCashierItemParam;
|
||||
import cn.daxpay.open.payment.merchant.result.gateway.GatewayCashierItemResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/// # 商户移动端-收银台配置服务
|
||||
///
|
||||
/// 转发至 [GatewayCashierConfigService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantGatewayCashierService {
|
||||
|
||||
private final GatewayCashierConfigService gatewayCashierConfigService;
|
||||
|
||||
/// 查询收银台支付项列表
|
||||
public List<GatewayCashierItemResult> list(String appId, String cashierType, String clientEnv) {
|
||||
return gatewayCashierConfigService.list(appId, cashierType, clientEnv);
|
||||
}
|
||||
|
||||
/// 新建收银台支付项
|
||||
public void save(GatewayCashierItemParam param) {
|
||||
gatewayCashierConfigService.save(param);
|
||||
}
|
||||
|
||||
/// 更新收银台支付项
|
||||
public void update(GatewayCashierItemParam param) {
|
||||
gatewayCashierConfigService.update(param);
|
||||
}
|
||||
|
||||
/// 删除收银台支付项
|
||||
public void delete(Long id) {
|
||||
gatewayCashierConfigService.delete(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.gateway;
|
||||
|
||||
import cn.daxpay.open.payment.common.context.PaymentContext;
|
||||
import cn.daxpay.open.payment.merchant.param.gateway.GatewayCodeConfigParam;
|
||||
import cn.daxpay.open.payment.merchant.result.appinfo.MchAppInfoResult;
|
||||
import cn.daxpay.open.payment.merchant.result.gateway.GatewayCodeConfigResult;
|
||||
import cn.daxpay.open.payment.merchant.service.appinfo.MchAppInfoService;
|
||||
import cn.daxpay.open.payment.merchant.service.gateway.GatewayCodeConfigService;
|
||||
import cn.daxpay.open.payment.route.service.support.PayRouteStrategyCapabilitySupport;
|
||||
import cn.daxpay.open.platform.core.code.CommonCode;
|
||||
import cn.daxpay.open.platform.core.exception.BizInfoException;
|
||||
import cn.daxpay.open.platform.core.rest.dto.ChannelMchOption;
|
||||
import cn.daxpay.open.platform.core.rest.dto.LabelValue;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/// # 商户移动端-码牌支付配置服务
|
||||
///
|
||||
/// 转发至 core [GatewayCodeConfigService];写操作强制当前上下文 mchNo。
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantGatewayCodeConfigService {
|
||||
|
||||
private final GatewayCodeConfigService gatewayCodeConfigService;
|
||||
private final PayRouteStrategyCapabilitySupport payRouteStrategyCapabilitySupport;
|
||||
private final MchAppInfoService mchAppInfoService;
|
||||
private final PaymentContext paymentContext;
|
||||
|
||||
/// 当前登录商户号
|
||||
private String requireMchNo() {
|
||||
String mchNo = paymentContext.getMchNo();
|
||||
if (mchNo == null || mchNo.isBlank()) {
|
||||
// 商户上下文缺失
|
||||
throw new BizInfoException(CommonCode.FAIL_CODE, "pay.error.assist.mchContextMissing");
|
||||
}
|
||||
return mchNo;
|
||||
}
|
||||
|
||||
/// 按应用查询码牌配置
|
||||
public GatewayCodeConfigResult findByAppId(String appId) {
|
||||
// 校验 appId 属于当前商户
|
||||
mchAppInfoService.findByAppId(appId);
|
||||
return gatewayCodeConfigService.findByAppId(appId);
|
||||
}
|
||||
|
||||
/// 保存或更新码牌配置
|
||||
public void saveOrUpdate(GatewayCodeConfigParam param) {
|
||||
MchAppInfoResult app = mchAppInfoService.findByAppId(param.getAppId());
|
||||
// 强制当前商户号,忽略客户端传入
|
||||
param.setMchNo(app.getMchNo() != null ? app.getMchNo() : requireMchNo());
|
||||
gatewayCodeConfigService.saveOrUpdate(param);
|
||||
}
|
||||
|
||||
/// DIRECT 模式: 通道商户候选
|
||||
public List<ChannelMchOption> listDirectChannelMchCandidates(String provider) {
|
||||
return payRouteStrategyCapabilitySupport.listDirectChannelMchCandidates(requireMchNo(), provider);
|
||||
}
|
||||
|
||||
/// DIRECT 模式: 支付能力候选
|
||||
public List<LabelValue> listDirectCapabilityCandidates(String channelMchNo) {
|
||||
return payRouteStrategyCapabilitySupport.listDirectCapabilityCandidates(channelMchNo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.info;
|
||||
|
||||
import cn.daxpay.open.payment.merchant.param.appinfo.MchAppInfoParam;
|
||||
import cn.daxpay.open.payment.merchant.param.appinfo.MchAppInfoQuery;
|
||||
import cn.daxpay.open.payment.merchant.result.appinfo.MchAppInfoResult;
|
||||
import cn.daxpay.open.payment.merchant.service.appinfo.MchAppInfoService;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/// # 商户移动端-商户应用服务
|
||||
///
|
||||
/// 转发至 core [MchAppInfoService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantAppInfoService {
|
||||
|
||||
private final MchAppInfoService mchAppInfoService;
|
||||
|
||||
/// 新增商户应用
|
||||
public void add(MchAppInfoParam param) {
|
||||
mchAppInfoService.add(param);
|
||||
}
|
||||
|
||||
/// 修改商户应用
|
||||
public void update(MchAppInfoParam param) {
|
||||
mchAppInfoService.update(param);
|
||||
}
|
||||
|
||||
/// 商户应用分页
|
||||
public PageResult<MchAppInfoResult> page(PageParam pageParam, MchAppInfoQuery query) {
|
||||
return mchAppInfoService.page(pageParam, query);
|
||||
}
|
||||
|
||||
/// 商户应用列表
|
||||
public List<MchAppInfoResult> list() {
|
||||
return mchAppInfoService.list();
|
||||
}
|
||||
|
||||
/// 根据id查询
|
||||
public MchAppInfoResult findById(Long id) {
|
||||
return mchAppInfoService.findById(id);
|
||||
}
|
||||
|
||||
/// 根据应用AppId获取应用详情
|
||||
public MchAppInfoResult findByAppId(String appId) {
|
||||
return mchAppInfoService.findByAppId(appId);
|
||||
}
|
||||
|
||||
/// 删除商户应用
|
||||
public void delete(Long id) {
|
||||
mchAppInfoService.delete(id);
|
||||
}
|
||||
|
||||
/// 设置默认商户应用
|
||||
public void setDefault(Long id) {
|
||||
mchAppInfoService.setDefault(id);
|
||||
}
|
||||
|
||||
/// 取消默认商户应用
|
||||
public void clearDefault(Long id) {
|
||||
mchAppInfoService.clearDefault(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.info;
|
||||
|
||||
import cn.daxpay.open.payment.merchant.param.info.MerchantInfoParam;
|
||||
import cn.daxpay.open.payment.merchant.result.info.MerchantInfoResult;
|
||||
import cn.daxpay.open.payment.merchant.service.info.MerchantInfoService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/// # 商户移动端-商户信息服务
|
||||
///
|
||||
/// 转发至 [MerchantInfoService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantInfoService {
|
||||
|
||||
private final MerchantInfoService merchantInfoService;
|
||||
|
||||
/// 获取当前登录商户信息
|
||||
public MerchantInfoResult getMerchant() {
|
||||
return merchantInfoService.getMerchant();
|
||||
}
|
||||
|
||||
/// 更新商户信息
|
||||
public void update(MerchantInfoParam param) {
|
||||
merchantInfoService.update(param);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.route;
|
||||
|
||||
import cn.daxpay.open.payment.admin.service.merchant.route.PayRouteConfigService;
|
||||
import cn.daxpay.open.payment.masterdata.result.provider.PayProviderMethodResult;
|
||||
import cn.daxpay.open.payment.masterdata.service.provider.PayProviderMethodService;
|
||||
import cn.daxpay.open.payment.route.param.basic.PayRouteBasicConfigBatchParam;
|
||||
import cn.daxpay.open.payment.route.param.scene.PayRouteSceneCapabilityBatchParam;
|
||||
import cn.daxpay.open.payment.route.param.scene.PayRouteSceneConfigBatchParam;
|
||||
import cn.daxpay.open.payment.route.param.strategy.PayRouteStrategyParam;
|
||||
import cn.daxpay.open.platform.core.rest.dto.ChannelMchOption;
|
||||
import cn.daxpay.open.platform.core.rest.dto.LabelValue;
|
||||
import cn.daxpay.open.payment.route.result.basic.PayRouteBasicConfigResult;
|
||||
import cn.daxpay.open.payment.route.result.scene.PayRouteSceneConfigResult;
|
||||
import cn.daxpay.open.payment.route.result.strategy.PayRouteStrategyResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/// # 商户移动端-通道路由配置服务
|
||||
///
|
||||
/// 转发至 [PayRouteConfigService] 和 [PayProviderMethodService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantPayRouteService {
|
||||
|
||||
private final PayRouteConfigService configService;
|
||||
private final PayProviderMethodService payProviderMethodService;
|
||||
|
||||
/// 已启用渠道支付方式扁平列表
|
||||
public List<PayProviderMethodResult> listMethodDirectoryFlat() {
|
||||
return payProviderMethodService.listDirectoryFlat();
|
||||
}
|
||||
|
||||
/// 获取或初始化应用路由策略
|
||||
public PayRouteStrategyResult getOrInitByAppId(String appId) {
|
||||
return configService.getOrInitByAppId(appId);
|
||||
}
|
||||
|
||||
/// 更新路由策略
|
||||
public PayRouteStrategyResult updateStrategy(PayRouteStrategyParam param) {
|
||||
return configService.updateStrategy(param);
|
||||
}
|
||||
|
||||
/// 查询场景模式配置列表
|
||||
public List<PayRouteSceneConfigResult> listSceneByAppId(String appId) {
|
||||
return configService.listSceneByAppId(appId);
|
||||
}
|
||||
|
||||
/// 批量保存场景模式配置
|
||||
public void saveSceneBatch(PayRouteSceneConfigBatchParam param) {
|
||||
configService.saveSceneBatch(param);
|
||||
}
|
||||
|
||||
/// 场景模式通道商户候选(批量)
|
||||
public Map<String, List<ChannelMchOption>> listSceneChannelMhCandidatesBatch(String appId) {
|
||||
return configService.listSceneChannelMchCandidatesBatch(appId);
|
||||
}
|
||||
|
||||
/// 场景模式支付能力候选(批量)
|
||||
public Map<String, List<LabelValue>> listSceneCapabilityCandidatesBatch(PayRouteSceneCapabilityBatchParam param) {
|
||||
return configService.listSceneCapabilityCandidatesBatch(param);
|
||||
}
|
||||
|
||||
/// 目录项下通道商户候选
|
||||
public List<ChannelMchOption> listSceneChannelMhCandidates(String appId, String provider, String method) {
|
||||
return configService.listSceneChannelMchCandidatesForMethod(appId, provider, method);
|
||||
}
|
||||
|
||||
/// 目录项与通道商户下支付能力候选
|
||||
public List<LabelValue> listSceneCapabilityCandidates(String appId, String provider, String method, String channelMchNo) {
|
||||
return configService.listSceneCapabilityCandidatesForMethod(appId, provider, method, channelMchNo);
|
||||
}
|
||||
|
||||
/// 查询基础模式配置列表
|
||||
public List<PayRouteBasicConfigResult> listBasicByAppId(String appId) {
|
||||
return configService.listBasicByAppId(appId);
|
||||
}
|
||||
|
||||
/// 批量保存基础模式配置
|
||||
public void saveBasicBatch(PayRouteBasicConfigBatchParam param) {
|
||||
configService.saveBasicBatch(param);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.store;
|
||||
|
||||
import cn.daxpay.open.payment.merchant.param.store.MchStoreInfoParam;
|
||||
import cn.daxpay.open.payment.merchant.param.store.MchStoreInfoQuery;
|
||||
import cn.daxpay.open.payment.merchant.result.store.MchStoreInfoResult;
|
||||
import cn.daxpay.open.payment.merchant.service.store.MchStoreInfoService;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/// # 商户移动端-门店信息服务
|
||||
///
|
||||
/// 转发至 core [MchStoreInfoService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantStoreInfoService {
|
||||
|
||||
private final MchStoreInfoService mchStoreInfoService;
|
||||
|
||||
/// 门店分页
|
||||
public PageResult<MchStoreInfoResult> page(PageParam pageParam, MchStoreInfoQuery query) {
|
||||
return mchStoreInfoService.page(pageParam, query);
|
||||
}
|
||||
|
||||
/// 根据id查询门店
|
||||
public MchStoreInfoResult findById(Long id) {
|
||||
return mchStoreInfoService.findById(id);
|
||||
}
|
||||
|
||||
/// 新增门店
|
||||
public void add(MchStoreInfoParam param) {
|
||||
mchStoreInfoService.add(param);
|
||||
}
|
||||
|
||||
/// 修改门店
|
||||
public void update(MchStoreInfoParam param) {
|
||||
mchStoreInfoService.update(param);
|
||||
}
|
||||
|
||||
/// 删除门店
|
||||
public void delete(Long id) {
|
||||
mchStoreInfoService.delete(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.trade;
|
||||
|
||||
import cn.daxpay.open.payment.merchant.service.trade.MchGatewayPayOrderService;
|
||||
import cn.daxpay.open.payment.trade.order.param.GatewayPayOrderQuery;
|
||||
import cn.daxpay.open.payment.trade.order.result.GatewayPayOrderResult;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/// # 商户移动端-网关支付业务单服务
|
||||
///
|
||||
/// 转发至 [MchGatewayPayOrderService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantGatewayPayOrderService {
|
||||
|
||||
private final MchGatewayPayOrderService mchGatewayPayOrderService;
|
||||
|
||||
/// 分页查询
|
||||
public PageResult<GatewayPayOrderResult> page(PageParam pageParam, GatewayPayOrderQuery query) {
|
||||
return mchGatewayPayOrderService.page(pageParam, query);
|
||||
}
|
||||
|
||||
/// 详情查询
|
||||
public GatewayPayOrderResult findById(Long id) {
|
||||
return mchGatewayPayOrderService.findById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.trade;
|
||||
|
||||
import cn.daxpay.open.payment.merchant.service.trade.MchNoticeService;
|
||||
import cn.daxpay.open.payment.trade.notice.param.MchNoticeTaskQuery;
|
||||
import cn.daxpay.open.payment.trade.notice.result.MchNoticeTaskResult;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/// # 商户移动端-商户出站通知服务
|
||||
///
|
||||
/// 转发至 [MchNoticeService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantMchNoticeService {
|
||||
|
||||
private final MchNoticeService mchNoticeService;
|
||||
|
||||
/// 通知任务分页
|
||||
public PageResult<MchNoticeTaskResult> pageTask(PageParam pageParam, MchNoticeTaskQuery query) {
|
||||
return mchNoticeService.pageTask(pageParam, query);
|
||||
}
|
||||
|
||||
/// 通知任务详情
|
||||
public MchNoticeTaskResult findTaskById(Long id) {
|
||||
return mchNoticeService.findTaskById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.trade;
|
||||
|
||||
import cn.daxpay.open.payment.trade.order.param.NormalPayOrderQuery;
|
||||
import cn.daxpay.open.payment.trade.order.result.NormalPayOrderResult;
|
||||
import cn.daxpay.open.payment.trade.order.service.NormalPayOrderService;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/// # 商户移动端-普通支付业务单服务
|
||||
///
|
||||
/// 转发至 core [NormalPayOrderService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantNormalPayOrderService {
|
||||
|
||||
private final NormalPayOrderService normalPayOrderService;
|
||||
|
||||
/// 分页查询
|
||||
public PageResult<NormalPayOrderResult> page(PageParam pageParam, NormalPayOrderQuery query) {
|
||||
return normalPayOrderService.page(pageParam, query);
|
||||
}
|
||||
|
||||
/// 详情查询
|
||||
public NormalPayOrderResult findById(Long id) {
|
||||
return normalPayOrderService.findById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.trade;
|
||||
|
||||
import cn.daxpay.open.payment.merchant.service.trade.MchPayCallbackRecordService;
|
||||
import cn.daxpay.open.payment.trade.record.param.PayCallbackRecordQuery;
|
||||
import cn.daxpay.open.payment.trade.record.result.PayCallbackRecordResult;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/// # 商户移动端-通道回调记录服务
|
||||
///
|
||||
/// 转发至 [MchPayCallbackRecordService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantPayCallbackRecordService {
|
||||
|
||||
private final MchPayCallbackRecordService mchPayCallbackRecordService;
|
||||
|
||||
/// 分页查询
|
||||
public PageResult<PayCallbackRecordResult> page(PageParam pageParam, PayCallbackRecordQuery query) {
|
||||
return mchPayCallbackRecordService.page(pageParam, query);
|
||||
}
|
||||
|
||||
/// 详情查询
|
||||
public PayCallbackRecordResult findById(Long id) {
|
||||
return mchPayCallbackRecordService.findById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.trade;
|
||||
|
||||
import cn.daxpay.open.payment.trade.order.param.PayTradeQuery;
|
||||
import cn.daxpay.open.payment.trade.order.result.PayTradeResult;
|
||||
import cn.daxpay.open.payment.trade.order.service.PayTradeService;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/// # 商户移动端-资金交易凭证服务
|
||||
///
|
||||
/// 转发至 core [PayTradeService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantPayTradeService {
|
||||
|
||||
private final PayTradeService payTradeService;
|
||||
|
||||
/// 分页查询
|
||||
public PageResult<PayTradeResult> page(PageParam pageParam, PayTradeQuery query) {
|
||||
return payTradeService.page(pageParam, query);
|
||||
}
|
||||
|
||||
/// 详情查询
|
||||
public PayTradeResult findById(Long id) {
|
||||
return payTradeService.findById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package cn.daxpay.open.payment.app.merchant.service.trade;
|
||||
|
||||
import cn.daxpay.open.payment.trade.order.param.RefundOrderQuery;
|
||||
import cn.daxpay.open.payment.trade.order.result.RefundOrderResult;
|
||||
import cn.daxpay.open.payment.trade.order.service.RefundOrderService;
|
||||
import cn.daxpay.open.platform.core.rest.param.PageParam;
|
||||
import cn.daxpay.open.platform.core.rest.result.PageResult;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/// # 商户移动端-退款订单服务
|
||||
///
|
||||
/// 转发至 core [RefundOrderService]
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppMerchantRefundOrderService {
|
||||
|
||||
private final RefundOrderService refundOrderService;
|
||||
|
||||
/// 分页查询
|
||||
public PageResult<RefundOrderResult> page(PageParam pageParam, RefundOrderQuery query) {
|
||||
return refundOrderService.page(pageParam, query);
|
||||
}
|
||||
|
||||
/// 详情查询
|
||||
public RefundOrderResult findById(Long id) {
|
||||
return refundOrderService.findById(id);
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@
|
||||
<module>daxpay-payment-core</module>
|
||||
<module>daxpay-payment-admin</module>
|
||||
<module>daxpay-payment-app-admin</module>
|
||||
<module>daxpay-payment-app-merchant</module>
|
||||
<module>daxpay-payment-unipay</module>
|
||||
<module>daxpay-payment-merchant</module>
|
||||
</modules>
|
||||
|
||||
@@ -58,6 +58,13 @@
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 商户移动端 APP/小程序(/app-merchant/**,转发 merchant/admin/core Service) -->
|
||||
<dependency>
|
||||
<groupId>cn.daxpay.open</groupId>
|
||||
<artifactId>daxpay-payment-app-merchant</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 开放支付端(统一收单/网关产品/公开 H5) -->
|
||||
<dependency>
|
||||
<groupId>cn.daxpay.open</groupId>
|
||||
|
||||
Reference in New Issue
Block a user