forked from wangziqi/ruoyi-vue-pro
chore(project): rebranded project as 恭学教育 (GongXue Education)
- Updated pom.xml project name, description, and URL to 恭学教育. - Changed LICENSE copyright holder to 恭学教育 (GongXue Education). - Rebranded README.md with new project title and tagline. - Replaced @author 芋道源码 with @author 恭学教育 across all Java source files. - Updated Swagger metadata with 恭学教育 API title and admin@gongxue.com. - Added Gitea Actions CI pipeline for automated build and deployment.
This commit is contained in:
@@ -11,7 +11,7 @@ import jakarta.validation.constraints.NotNull;
|
||||
/**
|
||||
* 支付单的通知 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
|
||||
@@ -11,7 +11,7 @@ import jakarta.validation.constraints.NotNull;
|
||||
/**
|
||||
* 退款单的通知 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
|
||||
@@ -12,7 +12,7 @@ import jakarta.annotation.Resource;
|
||||
/**
|
||||
* 支付单 API 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
public class PayOrderApiImpl implements PayOrderApi {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 支付单信息 Response DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class PayOrderRespDTO {
|
||||
|
||||
@@ -8,7 +8,7 @@ import jakarta.validation.Valid;
|
||||
/**
|
||||
* 退款单 API 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface PayRefundApi {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
/**
|
||||
* 退款单 API 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.hibernate.validator.constraints.Length;
|
||||
/**
|
||||
* 退款单创建 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class PayRefundCreateReqDTO {
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 退款单信息 Response DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class PayRefundRespDTO {
|
||||
|
||||
@@ -5,7 +5,7 @@ import lombok.Data;
|
||||
/**
|
||||
* 转账单创建 Response DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class PayTransferCreateRespDTO {
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 钱包 API 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
public class PayWalletApiImpl implements PayWalletApi {
|
||||
|
||||
@@ -7,7 +7,7 @@ import lombok.Data;
|
||||
/**
|
||||
* 钱包余额增加 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class PayWalletAddBalanceReqDTO {
|
||||
|
||||
@@ -11,7 +11,7 @@ import lombok.Data;
|
||||
@Data
|
||||
public class PayDemoWithdrawCreateReqVO {
|
||||
|
||||
@Schema(description = "提现标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿是一种菜")
|
||||
@Schema(description = "提现标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "管理员是一种菜")
|
||||
@NotEmpty(message = "提现标题不能为空")
|
||||
private String subject;
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public class PayOrderDetailsRespVO extends PayOrderBaseVO {
|
||||
@Schema(description = "支付订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道源码")
|
||||
@Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "恭学教育")
|
||||
private String appName;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
@@ -16,7 +16,7 @@ public class PayRefundDetailsRespVO extends PayRefundBaseVO {
|
||||
@Schema(description = "支付退款编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是芋艿")
|
||||
@Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是管理员")
|
||||
private String appName;
|
||||
|
||||
@Schema(description = "支付订单", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
@@ -16,7 +16,7 @@ public class PayRefundPageItemRespVO extends PayRefundBaseVO {
|
||||
@Schema(description = "支付订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是芋艿")
|
||||
@Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是管理员")
|
||||
private String appName;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
||||
@@ -29,7 +29,7 @@ public class PayTransferRespVO {
|
||||
private Long appId;
|
||||
|
||||
@ExcelProperty("应用名称")
|
||||
@Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@Schema(description = "应用名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "管理员")
|
||||
private String appName;
|
||||
|
||||
@Schema(description = "转账渠道编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "24833")
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.function.Consumer;
|
||||
/**
|
||||
* 支付应用信息 Convert
|
||||
*
|
||||
* @author 芋艿
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface PayAppConvert {
|
||||
|
||||
@@ -14,7 +14,7 @@ import lombok.*;
|
||||
*
|
||||
* 即 PayMerchantDO : PayAppDO = 1 : n
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName("pay_app")
|
||||
@KeySequence("pay_app_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.lang.reflect.Field;
|
||||
*
|
||||
* 即 PayAppDO : PayChannelDO = 1 : n
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName(value = "pay_channel", autoResultMap = true)
|
||||
@KeySequence("pay_channel_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.time.LocalDateTime;
|
||||
*
|
||||
* 演示业务系统的订单,如何接入 pay 系统的支付与退款
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName("pay_demo_order")
|
||||
@KeySequence("pay_demo_order_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.*;
|
||||
* 商户支付、退款等的通知 Log
|
||||
* 每次通知时,都会在该表中,记录一次 Log,方便排查问题
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName("pay_notify_log")
|
||||
@KeySequence("pay_notify_log_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.time.LocalDateTime;
|
||||
* 支付通知
|
||||
* 在支付系统收到支付渠道的支付、退款的结果后,需要不断的通知到业务系统,直到成功。
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName("pay_notify_task")
|
||||
@KeySequence("pay_notify_task_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 支付订单 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName("pay_order")
|
||||
@KeySequence("pay_order_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.Map;
|
||||
*
|
||||
* 每次调用支付渠道,都会生成一条对应记录
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName(value = "pay_order_extension",autoResultMap = true)
|
||||
@KeySequence("pay_order_extension_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.time.LocalDateTime;
|
||||
*
|
||||
* 即 PayOrderDO : PayRefundDO = 1 : n
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName("pay_refund")
|
||||
@KeySequence("pay_refund_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -11,7 +11,7 @@ import lombok.Data;
|
||||
*
|
||||
* 通过充值套餐时,可以赠送一定金额;
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@TableName(value ="pay_wallet_recharge_package")
|
||||
@KeySequence("pay_wallet_recharge_package_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
/**
|
||||
* 示例订单 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Mapper
|
||||
public interface PayDemoOrderMapper extends BaseMapperX<PayDemoOrderDO> {
|
||||
|
||||
@@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.pay.dal.redis;
|
||||
/**
|
||||
* 支付 Redis Key 枚举类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface RedisKeyConstants {
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 支付序号的 Redis DAO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Repository
|
||||
public class PayNoRedisDAO {
|
||||
|
||||
@@ -12,7 +12,7 @@ import static cn.iocoder.yudao.module.pay.dal.redis.RedisKeyConstants.PAY_NOTIFY
|
||||
/**
|
||||
* 支付通知的锁 Redis DAO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Repository
|
||||
public class PayNotifyLockRedisDAO {
|
||||
|
||||
@@ -13,7 +13,7 @@ import static cn.iocoder.yudao.module.pay.dal.redis.RedisKeyConstants.PAY_WALLET
|
||||
/**
|
||||
* 支付钱包的锁 Redis DAO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Repository
|
||||
public class PayWalletLockRedisDAO {
|
||||
|
||||
@@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.pay.enums;
|
||||
/**
|
||||
* Pay 字典类型的枚举类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface DictTypeConstants {
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.Arrays;
|
||||
/**
|
||||
* 支付渠道的编码的枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
/**
|
||||
* 支付通知状态枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
/**
|
||||
* 支付通知类型
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.Objects;
|
||||
/**
|
||||
* 支付订单的状态枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.Objects;
|
||||
/**
|
||||
* 渠道的退款状态枚举
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 属于 pay 模块的 framework 封装
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
package cn.iocoder.yudao.module.pay.framework;
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 支付客户端,用于对接各支付渠道的 SDK,实现发起支付、退款等功能
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface PayClient<Config> {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import jakarta.validation.Validator;
|
||||
* 支付客户端的配置,本质是支付渠道的配置
|
||||
* 每个不同的渠道,需要不同的配置,通过子类来定义
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)
|
||||
// @JsonTypeInfo 注解的作用,Jackson 多态
|
||||
|
||||
@@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.pay.framework.pay.core.client;
|
||||
/**
|
||||
* 支付客户端的工厂接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface PayClientFactory {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* 渠道支付订单 Response DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class PayOrderRespDTO {
|
||||
|
||||
@@ -14,7 +14,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 统一下单 Request DTO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class PayOrderUnifiedReqDTO {
|
||||
|
||||
@@ -20,7 +20,7 @@ import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString
|
||||
/**
|
||||
* 支付客户端的抽象类,提供模板方法,减少子类的冗余代码
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Slf4j
|
||||
public abstract class AbstractPayClient<Config extends PayClientConfig> implements PayClient<Config> {
|
||||
|
||||
@@ -23,7 +23,7 @@ import static cn.iocoder.yudao.module.pay.enums.PayChannelEnum.*;
|
||||
/**
|
||||
* 支付客户端的工厂实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Slf4j
|
||||
public class PayClientFactoryImpl implements PayClientFactory {
|
||||
|
||||
@@ -315,7 +315,7 @@ public abstract class AbstractAlipayPayClient extends AbstractPayClient<AlipayPa
|
||||
response.getOutBizNo(), response);
|
||||
}
|
||||
|
||||
// TODO @芋艿:由于支付宝一直没触发回调,这个方法暂时没办法测试
|
||||
// TODO @管理员:由于支付宝一直没触发回调,这个方法暂时没办法测试
|
||||
@Override
|
||||
protected PayTransferRespDTO doParseTransferNotify(Map<String, String> params, String body, Map<String, String> headers)
|
||||
throws Throwable {
|
||||
|
||||
@@ -15,9 +15,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
*
|
||||
* 文档:<a href="https://opendocs.alipay.com/open/02e7gq">App 支付</a>
|
||||
*
|
||||
* // TODO 芋艿:未详细测试,因为手头没 App
|
||||
* // TODO 管理员:未详细测试,因为手头没 App
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Slf4j
|
||||
public class AlipayAppPayClient extends AbstractAlipayPayClient {
|
||||
|
||||
@@ -25,7 +25,7 @@ import static cn.iocoder.yudao.module.pay.framework.pay.core.client.impl.alipay.
|
||||
*
|
||||
* 文档:<a href="https://opendocs.alipay.com/open/194/105072">当面付</a>
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Slf4j
|
||||
public class AlipayBarPayClient extends AbstractAlipayPayClient {
|
||||
|
||||
@@ -12,7 +12,7 @@ import jakarta.validation.constraints.NotNull;
|
||||
* 支付宝的 PayClientConfig 实现类
|
||||
* 属性主要来自 {@link com.alipay.api.AlipayConfig} 的必要属性
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class AlipayPayClientConfig implements PayClientConfig {
|
||||
|
||||
@@ -19,7 +19,7 @@ import static cn.iocoder.yudao.module.pay.framework.pay.core.client.impl.alipay.
|
||||
*
|
||||
* 文档:<a href="https://opendocs.alipay.com/apis/02890k">扫码支付</a>
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Slf4j
|
||||
public class AlipayQrPayClient extends AbstractAlipayPayClient {
|
||||
|
||||
@@ -16,7 +16,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
*
|
||||
* 文档:<a href="https://opendocs.alipay.com/apis/api_1/alipay.trade.wap.pay">手机网站支付接口</a>
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Slf4j
|
||||
public class AlipayWapPayClient extends AbstractAlipayPayClient {
|
||||
|
||||
@@ -42,7 +42,7 @@ import static cn.iocoder.yudao.module.pay.framework.pay.core.client.impl.weixin.
|
||||
/**
|
||||
* 微信支付抽象类,实现微信统一的接口、以及部分实现(退款)
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Slf4j
|
||||
public abstract class AbstractWxPayClient extends AbstractPayClient<WxPayClientConfig> {
|
||||
@@ -93,7 +93,7 @@ public abstract class AbstractWxPayClient extends AbstractPayClient<WxPayClientC
|
||||
case API_VERSION_V2:
|
||||
return doUnifiedOrderV2(reqDTO);
|
||||
case API_VERSION_V3:
|
||||
// TODO @芋艿:【可能是 wxjava 的 bug】参考 https://github.com/binarywang/WxJava/issues/1557
|
||||
// TODO @管理员:【可能是 wxjava 的 bug】参考 https://github.com/binarywang/WxJava/issues/1557
|
||||
client.getConfig().setApiV3HttpClient(null);
|
||||
return doUnifiedOrderV3(reqDTO);
|
||||
default:
|
||||
|
||||
@@ -20,9 +20,9 @@ import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString
|
||||
*
|
||||
* 文档:<a href="https://pay.weixin.qq.com/wiki/doc/apiv3/open/pay/chapter2_5_3.shtml">App 支付</a>
|
||||
*
|
||||
* // TODO 芋艿:未详细测试,因为手头没 App
|
||||
* // TODO 管理员:未详细测试,因为手头没 App
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Slf4j
|
||||
public class WxAppPayClient extends AbstractWxPayClient {
|
||||
|
||||
@@ -26,7 +26,7 @@ import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString
|
||||
*
|
||||
* 文档:<a href="https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=9_10&index=1">付款码支付</a>
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Slf4j
|
||||
public class WxBarPayClient extends AbstractWxPayClient {
|
||||
|
||||
@@ -10,7 +10,7 @@ import lombok.Data;
|
||||
* 微信支付的 PayClientConfig 实现类
|
||||
* 属性主要来自 {@link com.github.binarywang.wxpay.config.WxPayConfig} 的必要属性
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Data
|
||||
public class WxPayClientConfig implements PayClientConfig {
|
||||
|
||||
@@ -23,7 +23,7 @@ import static cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString
|
||||
*
|
||||
* 文档:<a href="https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter3_1_1.shtml">JSAPI 下单</>
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Slf4j
|
||||
public class WxPubPayClient extends AbstractWxPayClient {
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
/**
|
||||
* 支付 UI 展示模式
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
/**
|
||||
* pay 模块的 web 组件的 Configuration
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
public class PayWebConfiguration {
|
||||
|
||||
@@ -12,7 +12,7 @@ import jakarta.annotation.Resource;
|
||||
* 支付通知 Job
|
||||
* 通过不断扫描待通知的 PayNotifyTaskDO 记录,回调业务线的回调接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
|
||||
@@ -13,7 +13,7 @@ import jakarta.annotation.Resource;
|
||||
*
|
||||
* 支付超过过期时间时,支付渠道是不会通知进行过期,所以需要定时进行过期关闭。
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Component
|
||||
public class PayOrderExpireJob implements JobHandler {
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.time.LocalDateTime;
|
||||
*
|
||||
* 由于支付订单的状态,是由支付渠道异步通知进行同步,考虑到异步通知可能会失败(小概率),所以需要定时进行同步。
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Component
|
||||
public class PayOrderSyncJob implements JobHandler {
|
||||
|
||||
@@ -13,7 +13,7 @@ import jakarta.annotation.Resource;
|
||||
*
|
||||
* 由于退款订单的状态,是由支付渠道异步通知进行同步,考虑到异步通知可能会失败(小概率),所以需要定时进行同步。
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Component
|
||||
public class PayRefundSyncJob implements JobHandler {
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 支付应用 Service 接口
|
||||
*
|
||||
* @author 芋艿
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface PayAppService {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import jakarta.validation.Valid;
|
||||
/**
|
||||
* 示例订单 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface PayDemoOrderService {
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 示例订单 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
/**
|
||||
* 回调通知 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
public interface PayNotifyService {
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ import static cn.iocoder.yudao.module.pay.framework.job.config.PayJobConfigurati
|
||||
/**
|
||||
* 支付通知 Core Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author 恭学教育
|
||||
*/
|
||||
@Service
|
||||
@Valid
|
||||
|
||||
@@ -101,7 +101,7 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService {
|
||||
.setMerchantOrderId(recharge.getId().toString()) // 业务的订单编号
|
||||
.setSubject(WALLET_RECHARGE_ORDER_SUBJECT).setBody("")
|
||||
.setPrice(recharge.getPayPrice())
|
||||
.setExpireTime(addTime(Duration.ofHours(2L)))); // TODO @芋艿:支付超时时间
|
||||
.setExpireTime(addTime(Duration.ofHours(2L)))); // TODO @管理员:支付超时时间
|
||||
// 2.2 更新钱包充值记录中支付订单
|
||||
walletRechargeMapper.updateById(new PayWalletRechargeDO().setId(recharge.getId()).setPayOrderId(payOrderId));
|
||||
recharge.setPayOrderId(payOrderId);
|
||||
@@ -297,7 +297,7 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService {
|
||||
if (wallet.getBalance() < walletRecharge.getTotalPrice()) {
|
||||
throw exception(WALLET_RECHARGE_REFUND_BALANCE_NOT_ENOUGH);
|
||||
}
|
||||
// TODO @芋艿:需要考虑下,赠送的金额,会不会导致提现超过;
|
||||
// TODO @管理员:需要考虑下,赠送的金额,会不会导致提现超过;
|
||||
return wallet;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user