微信支付部分

This commit is contained in:
menxipeng
2025-11-24 23:42:09 +08:00
parent b29d2c696c
commit c7fd167167
17 changed files with 523 additions and 60 deletions

View File

@@ -0,0 +1,60 @@
package com.ruoyi.common.constant;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
/**
* 描述:
*
* @author MXP by 2025/11/24
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Configuration
@Component
public class WeChatConfig implements InitializingBean {
// merchantId: 1732990772
// privateKeyPath: D:\musicpro\apiclient_key.pem
// merchantCertPath: D:\musicpro\apiclient_cert.pem
// wechatPayCertPath: D:\musicpro\pub_key.pem
// publicKeyId: PUB_KEY_ID_0117329907722025112100111619002400
@Value("${wechat.appId}")
public String appId;
@Value("${wechat.merchantId}")
public String merchantId;
@Value("${wechat.privateKeyPath}")
public String privateKeyPath;
@Value("${wechat.merchantCertPath}")
public String merchantCertPath;
@Value("${wechat.wechatPayCertPath}")
public String wechatPayCertPath;
@Value("${wechat.apiV3Key}")
public String apiV3Key;
@Value("${wechat.publicKeyId}")
public String publicKeyId;
public static String APP_ID;
public static String MERCHANT_ID;
public static String PRIVATE_KEY_PATH;
public static String MERCHANT_CERT_PATH;
public static String WECHAT_PAY_CERT_PATH;
public static String API_V3_KEY;
public static String PUBLIC_KEY_ID;
@Override
public void afterPropertiesSet() {
APP_ID = this.appId;
MERCHANT_ID = this.merchantId;
PRIVATE_KEY_PATH = this.privateKeyPath;
MERCHANT_CERT_PATH = this.merchantCertPath;
WECHAT_PAY_CERT_PATH = this.wechatPayCertPath;
API_V3_KEY = this.apiV3Key;
PUBLIC_KEY_ID = this.publicKeyId;
}
}

View File

@@ -103,4 +103,7 @@ public class OrderInfo extends BaseEntity
/** 乐观锁版本号 */
@Excel(name = "乐观锁版本号")
private Long version;
private String description;
}