diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 0d88939..de38128 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -23,9 +23,9 @@
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index 6833148..ee58f12 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -16,11 +16,21 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue/CityMoneyLogList.vue b/admin-hanhai-vue/src/views/cityMoneyLog/CityMoneyLogList.vue
similarity index 66%
rename from jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue/CityMoneyLogList.vue
rename to admin-hanhai-vue/src/views/cityMoneyLog/CityMoneyLogList.vue
index 2d43070..c3ad481 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue/CityMoneyLogList.vue
+++ b/admin-hanhai-vue/src/views/cityMoneyLog/CityMoneyLogList.vue
@@ -4,6 +4,26 @@
@@ -123,9 +143,10 @@
}
},
{
- title:'金额',
+ title:'创建日期',
align:"center",
- dataIndex: 'intger'
+ sorter: true,
+ dataIndex: 'createTime'
},
{
title:'用户',
@@ -133,15 +154,50 @@
dataIndex: 'userId_dictText'
},
{
- title:'类型0获得1消耗',
+ title:'提现者姓名',
align:"center",
- dataIndex: 'type'
+ dataIndex: 'name'
},
{
- title:'名称',
+ title:'流水备注',
align:"center",
dataIndex: 'title'
},
+ {
+ title:'金额',
+ align:"center",
+ dataIndex: 'price'
+ },
+ {
+ title:'状态',
+ align:"center",
+ dataIndex: 'state_dictText'
+ },
+ {
+ title:'到账时间',
+ align:"center",
+ dataIndex: 'successtime'
+ },
+ {
+ title:'类型',
+ align:"center",
+ dataIndex: 'type_dictText'
+ },
+ {
+ title:'回调',
+ align:"center",
+ dataIndex: 'packageInfo'
+ },
+ {
+ title:'标识',
+ align:"center",
+ dataIndex: 'outBatchNo'
+ },
+ {
+ title:'内容',
+ align:"center",
+ dataIndex: 'batchId'
+ },
{
title: '操作',
dataIndex: 'action',
@@ -176,10 +232,17 @@
},
getSuperFieldList(){
let fieldList=[];
- fieldList.push({type:'BigDecimal',value:'intger',text:'金额',dictCode:''})
+ fieldList.push({type:'datetime',value:'createTime',text:'创建日期'})
fieldList.push({type:'sel_search',value:'userId',text:'用户',dictTable:"han_hai_member", dictText:'nick_name', dictCode:'id'})
- fieldList.push({type:'int',value:'type',text:'类型0获得1消耗',dictCode:''})
- fieldList.push({type:'string',value:'title',text:'名称',dictCode:''})
+ fieldList.push({type:'string',value:'name',text:'提现者姓名',dictCode:''})
+ fieldList.push({type:'string',value:'title',text:'流水备注',dictCode:''})
+ fieldList.push({type:'BigDecimal',value:'price',text:'金额',dictCode:''})
+ fieldList.push({type:'int',value:'state',text:'状态',dictCode:'money_pay_state'})
+ fieldList.push({type:'datetime',value:'successtime',text:'到账时间'})
+ fieldList.push({type:'int',value:'type',text:'类型',dictCode:'money_pay'})
+ fieldList.push({type:'Text',value:'packageInfo',text:'回调',dictCode:''})
+ fieldList.push({type:'Text',value:'outBatchNo',text:'标识',dictCode:''})
+ fieldList.push({type:'Text',value:'batchId',text:'内容',dictCode:''})
this.superFieldList = fieldList
}
}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue/modules/CityMoneyLogForm.vue b/admin-hanhai-vue/src/views/cityMoneyLog/modules/CityMoneyLogForm.vue
similarity index 56%
rename from jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue/modules/CityMoneyLogForm.vue
rename to admin-hanhai-vue/src/views/cityMoneyLog/modules/CityMoneyLogForm.vue
index 2a87e24..7ca8a60 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue/modules/CityMoneyLogForm.vue
+++ b/admin-hanhai-vue/src/views/cityMoneyLog/modules/CityMoneyLogForm.vue
@@ -4,23 +4,53 @@
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue/modules/CityMoneyLogModal.Style#Drawer.vue b/admin-hanhai-vue/src/views/cityMoneyLog/modules/CityMoneyLogModal.Style#Drawer.vue
similarity index 100%
rename from jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue/modules/CityMoneyLogModal.Style#Drawer.vue
rename to admin-hanhai-vue/src/views/cityMoneyLog/modules/CityMoneyLogModal.Style#Drawer.vue
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue/modules/CityMoneyLogModal.vue b/admin-hanhai-vue/src/views/cityMoneyLog/modules/CityMoneyLogModal.vue
similarity index 100%
rename from jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue/modules/CityMoneyLogModal.vue
rename to admin-hanhai-vue/src/views/cityMoneyLog/modules/CityMoneyLogModal.vue
diff --git a/jeecg-boot-base/jeecg-boot-base-api/jeecg-system-local-api/target/classes/org/jeecg/common/system/api/ISysBaseAPI.class b/jeecg-boot-base/jeecg-boot-base-api/jeecg-system-local-api/target/classes/org/jeecg/common/system/api/ISysBaseAPI.class
deleted file mode 100644
index 9497bd6..0000000
Binary files a/jeecg-boot-base/jeecg-boot-base-api/jeecg-system-local-api/target/classes/org/jeecg/common/system/api/ISysBaseAPI.class and /dev/null differ
diff --git a/jeecg-boot-base/jeecg-boot-base-core/pom.xml b/jeecg-boot-base/jeecg-boot-base-core/pom.xml
index be7b740..0e44dee 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/pom.xml
+++ b/jeecg-boot-base/jeecg-boot-base-core/pom.xml
@@ -261,6 +261,17 @@
compile
+
+ com.github.wechatpay-apiv3
+ wechatpay-java
+ ${wechatpay-java.version}
+
+
+
+ com.github.wechatpay-apiv3
+ wechatpay-apache-httpclient
+ ${wechatpay-apache-httpclientd.version}
+
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/HttpRequestUtil.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/HttpRequestUtil.java
new file mode 100644
index 0000000..b4cfdfb
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/HttpRequestUtil.java
@@ -0,0 +1,192 @@
+package org.jeecg.config;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.ParseException;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.URLDecoder;
+
+/**
+ * Created by null on 2017/2/23.
+ */
+@Slf4j
+public class HttpRequestUtil {
+
+ private static Logger logger = LoggerFactory.getLogger(HttpRequestUtil.class); //日志记录
+
+ /**
+ * post请求
+ * @param url url地址
+ * @param jsonParam 参数
+ * @return
+ */
+ public static String post(String url,String jsonParam){
+ //post请求返回结果
+ DefaultHttpClient httpClient = new DefaultHttpClient();
+ String jsonResult = null;
+ HttpPost method = new HttpPost(url);
+ try {
+ if (null != jsonParam) {
+ //解决中文乱码问题
+ StringEntity entity = new StringEntity(jsonParam.toString(), "utf-8");
+ entity.setContentEncoding("UTF-8");
+ entity.setContentType("application/json");
+ method.setEntity(entity);
+ }
+ HttpResponse result = httpClient.execute(method);
+ url = URLDecoder.decode(url, "UTF-8");
+ /**请求发送成功,并得到响应**/
+ if (result.getStatusLine().getStatusCode() == 200) {
+ String str = "";
+ try {
+ /**读取服务器返回过来的json字符串数据**/
+ str = EntityUtils.toString(result.getEntity());
+ return str;
+ /**把json字符串转换成json对象**/
+// jsonResult = JSONObject.fromObject(str);
+ } catch (Exception e) {
+ logger.error("post请求提交失败:" + url, e);
+ }
+ }
+ } catch (IOException e) {
+ logger.error("post请求提交失败:" + url, e);
+ }
+ return jsonResult;
+ }
+
+ /**
+ * 发送get请求
+ * @param url 路径
+ * @return
+ */
+ public static String get(String url){
+ String responseString = null;
+ try {
+ DefaultHttpClient client = new DefaultHttpClient();
+ //发送get请求
+ HttpGet request = new HttpGet(url);
+ HttpResponse response = client.execute(request);
+
+ /**请求发送成功,并得到响应**/
+ if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
+ /**读取服务器返回过来的json字符串数据**/
+ return EntityUtils.toString(response.getEntity());
+ /**把json字符串转换成json对象**/
+ } else {
+ logger.error("get请求提交失败:" + url);
+ }
+ } catch (IOException e) {
+ logger.error("get请求提交失败:" + url, e);
+ }
+ return responseString;
+ }
+
+
+ /**
+ * 发起批量转账API 批量转账到零钱
+ *
+ * @param requestUrl
+ * @param requestJson 组合参数
+ * @param wechatPayserialNo 商户证书序列号
+ * @param mchID4M 商户号
+ * @param privatekeypath 商户私钥证书路径
+ * @return
+ */
+ public static String postTransBatRequest(
+ String requestUrl,
+ String requestJson,
+ String wechatPayserialNo,
+ String wechatPayserialNo2,
+ String mchID4M,
+ String privatekeypath) {
+ CloseableHttpClient httpclient = HttpClients.createDefault();
+ CloseableHttpResponse response = null;
+ HttpEntity entity = null;
+ try {
+ //商户私钥证书
+ HttpPost httpPost = new HttpPost(requestUrl);
+ // NOTE: 建议指定charset=utf-8。低于4.4.6版本的HttpCore,不能正确的设置字符集,可能导致签名错误
+ httpPost.addHeader("Content-Type", "application/json");
+ httpPost.addHeader("Accept", "application/json");
+ //"55E551E614BAA5A3EA38AE03849A76D8C7DA735A");
+ httpPost.addHeader("Wechatpay-Serial", wechatPayserialNo);
+ //-------------------------核心认证 start-----------------------------------------------------------------
+ String strToken = VechatPayV3Util.getToken("POST",
+ "/v3/fund-app/mch-transfer/transfer-bills",
+ requestJson,mchID4M,wechatPayserialNo2, privatekeypath);
+
+ log.error("微信转账token "+strToken);
+ // 添加认证信息
+ httpPost.addHeader("Authorization",
+ "WECHATPAY2-SHA256-RSA2048" + " "
+ + strToken);
+ //---------------------------核心认证 end---------------------------------------------------------------
+ httpPost.setEntity(new StringEntity(requestJson, "UTF-8"));
+ //发起转账请求
+ response = httpclient.execute(httpPost);
+ entity = response.getEntity();//获取返回的数据
+ log.info("-----getHeaders.Request-ID:"+response.getHeaders("Request-ID"));
+ return EntityUtils.toString(entity,"UTF-8");
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ // 关闭流
+ }
+ return null;
+ }
+
+
+ /**
+ * 发送HTTP_GET请求
+ *
+ * @see 该方法会自动关闭连接,释放资源
+ * @param reqURL
+ * 请求地址(含参数)
+ * @param decodeCharset
+ * 解码字符集,解析响应数据时用之,其为null时默认采用UTF-8解码
+ * @return 远程主机响应正文
+ */
+ public static String sendGetRequest(String reqURL,String auth,String decodeCharset) {
+ long responseLength = 0; // 响应长度
+ String responseContent = null; // 响应内容
+ CloseableHttpClient httpclient = HttpClients.createDefault();
+
+ HttpGet httpGet = new HttpGet(reqURL); // 创建org.apache.http.client.methods.HttpGet
+ httpGet.addHeader("Authorization", auth);
+ httpGet.addHeader("Accept", "application/json");
+ httpGet.addHeader("User-Agent", "https://zh.wikipedia.org/wiki/User_agent");
+ try {
+ HttpResponse response = httpclient.execute(httpGet); // 执行GET请求
+ HttpEntity entity = response.getEntity(); // 获取响应实体
+ if (null != entity) {
+ responseLength = entity.getContentLength();
+ responseContent = EntityUtils.toString(entity, decodeCharset == null ? "UTF-8" : decodeCharset);
+ EntityUtils.consume(entity); // Consume response content
+ }
+ } catch (ClientProtocolException e) {
+ System.out.println("该异常通常是协议错误导致,比如构造HttpGet对象时传入的协议不对(将'http'写成'htp')或者服务器端返回的内容不符合HTTP协议要求等,堆栈信息如下");
+ } catch (ParseException e) {
+ System.out.println(e.getMessage());
+ } catch (IOException e) {
+ System.out.println("该异常通常是网络原因引起的,如HTTP服务器未启动等,堆栈信息如下");
+ } finally {
+ httpclient.getConnectionManager().shutdown(); // 关闭连接,释放资源
+ }
+ return responseContent;
+ }
+
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/MoneyUtil.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/MoneyUtil.java
new file mode 100644
index 0000000..8fccc14
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/MoneyUtil.java
@@ -0,0 +1,28 @@
+package org.jeecg.config;
+
+import java.math.BigDecimal;
+
+/**
+ * Created by 廖师兄
+ * 2017-07-02 13:53
+ */
+public class MoneyUtil {
+
+ /**
+ * 元转分
+ * @param yuan
+ * @return
+ */
+ public static Integer Yuan2Fen(Double yuan) {
+ return new BigDecimal(String.valueOf(yuan)).movePointRight(2).intValue();
+ }
+
+ /**
+ * 分转元
+ * @param fen
+ * @return
+ */
+ public static Double Fen2Yuan(Integer fen) {
+ return new BigDecimal(fen).movePointLeft(2).doubleValue();
+ }
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/VechatPayV3Util.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/VechatPayV3Util.java
new file mode 100644
index 0000000..aff7fac
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/VechatPayV3Util.java
@@ -0,0 +1,122 @@
+package org.jeecg.config;
+
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.binary.Base64;
+import org.springframework.util.StringUtils;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.security.KeyFactory;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivateKey;
+import java.security.Signature;
+import java.security.spec.InvalidKeySpecException;
+import java.security.spec.PKCS8EncodedKeySpec;
+import java.util.Random;
+
+/**
+ * @author java996.icu
+ * @title: VechatPayV3Util
+ * @projectName chemu
+ * @description: TODO
+ * @date 2022/12/8 15:00
+ * @Version V1.0
+ */
+@Slf4j
+public class VechatPayV3Util {
+
+ /**
+ *
+ * @param method 请求方法 post
+ * @param canonicalUrl 请求地址
+ * @param body 请求参数
+ * @param merchantId 这里用的商户号
+ * @param certSerialNo 商户证书序列号
+ * @param keyPath 商户证书地址
+ * @return
+ * @throws Exception
+ */
+ public static String getToken(
+ String method,
+ String canonicalUrl,
+ String body,
+ String merchantId,
+ String certSerialNo,
+ String keyPath) throws Exception {
+ String signStr = "";
+ //获取32位随机字符串
+ String nonceStr = getRandomString(32);
+ //当前系统运行时间
+ long timestamp = System.currentTimeMillis() / 1000;
+ if (StringUtils.isEmpty(body)) {
+ body = "";
+ }
+ //签名操作
+ String message = buildMessage(method, canonicalUrl, timestamp, nonceStr, body);
+ //签名操作
+ String signature = sign(message.getBytes("utf-8"), keyPath);
+ //组装参数
+ signStr = "mchid=\"" + merchantId + "\",timestamp=\"" + timestamp+ "\",nonce_str=\"" + nonceStr
+ + "\",serial_no=\"" + certSerialNo + "\",signature=\"" + signature + "\"";
+
+ return signStr;
+ }
+
+ public static String buildMessage(String method, String canonicalUrl, long timestamp, String nonceStr, String body) {
+// String canonicalUrl = url.encodedPath();
+// if (url.encodedQuery() != null) {
+// canonicalUrl += "?" + url.encodedQuery();
+// }
+ return method + "\n" + canonicalUrl + "\n" + timestamp + "\n" + nonceStr + "\n" + body + "\n";
+ }
+
+ public static String sign(byte[] message, String keyPath) throws Exception {
+ Signature sign = Signature.getInstance("SHA256withRSA");
+ sign.initSign(getPrivateKey(keyPath));
+ sign.update(message);
+ return Base64.encodeBase64String(sign.sign());
+ }
+
+ /**
+ * 微信支付-前端唤起支付参数-获取商户私钥
+ *
+ * @param filename 私钥文件路径 (required)
+ * @return 私钥对象
+ */
+ public static PrivateKey getPrivateKey(String filename) throws IOException {
+
+ log.error("签名 证书地址是 "+filename);
+ String content = new String(Files.readAllBytes(Paths.get(filename)), "utf-8");
+ try {
+ String privateKey = content.replace("-----BEGIN PRIVATE KEY-----", "")
+ .replace("-----END PRIVATE KEY-----", "")
+ .replaceAll("\\s+", "");
+ //System.out.println("--------privateKey---------:"+privateKey);
+ KeyFactory kf = KeyFactory.getInstance("RSA");
+ return kf.generatePrivate(
+ new PKCS8EncodedKeySpec(Base64.decodeBase64(privateKey)));
+ } catch (NoSuchAlgorithmException e) {
+ throw new RuntimeException("当前Java环境不支持RSA", e);
+ } catch (InvalidKeySpecException e) {
+ throw new RuntimeException("无效的密钥格式");
+ }
+ }
+ /**
+ * 获取随机位数的字符串
+ * @param length
+ * @return
+ */
+ public static String getRandomString(int length) {
+ String base = "abcdefghijklmnopqrstuvwxyz0123456789";
+ Random random = new Random();
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < length; i++) {
+ int number = random.nextInt(base.length());
+ sb.append(base.charAt(number));
+ }
+ return sb.toString();
+ }
+
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/pay/WeChatPayConfig2.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/pay/WeChatPayConfig2.java
new file mode 100644
index 0000000..478ee8b
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/config/pay/WeChatPayConfig2.java
@@ -0,0 +1,207 @@
+package org.jeecg.config.pay;
+
+import com.wechat.pay.contrib.apache.httpclient.WechatPayHttpClientBuilder;
+import com.wechat.pay.contrib.apache.httpclient.auth.PrivateKeySigner;
+import com.wechat.pay.contrib.apache.httpclient.auth.Verifier;
+import com.wechat.pay.contrib.apache.httpclient.auth.WechatPay2Credentials;
+import com.wechat.pay.contrib.apache.httpclient.auth.WechatPay2Validator;
+import com.wechat.pay.contrib.apache.httpclient.cert.CertificatesManager;
+import com.wechat.pay.contrib.apache.httpclient.exception.HttpCodeException;
+import com.wechat.pay.contrib.apache.httpclient.exception.NotFoundException;
+import com.wechat.pay.contrib.apache.httpclient.util.PemUtil;
+import lombok.Data;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.stereotype.Component;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.security.GeneralSecurityException;
+import java.security.PrivateKey;
+
+/**
+ * @author java996.icu
+ * @title: WeChatPayConfig2
+ * @projectName chemu
+ * @description: TODO
+ * @date 2022/12/7 16:36
+ * @Version V1.0
+ */
+@Component
+@Data
+@Slf4j
+@ConfigurationProperties(prefix = "wxpay")
+public class WeChatPayConfig2 {
+
+ /**
+ * 应用编号
+ */
+ private String appId;
+ /**
+ * 商户号
+ */
+ private String mchId;
+ /**
+ * 服务商商户号
+ */
+ private String slMchId;
+ /**
+ * APIv2密钥
+ */
+ private String apiKey;
+ /**
+ * APIv3密钥
+ */
+ private String apiV3Key;
+ /**
+ * 支付通知回调地址
+ */
+ private String notifyUrl;
+ /**
+ * 退款回调地址
+ */
+ private String refundNotifyUrl;
+
+ /**
+ * API 证书中的 key.pem
+ */
+ private String keyPemPath;
+
+ /**
+ * 商户序列号
+ */
+ private String serialNo;
+
+ /**
+ * 微信支付V3-url前缀
+ */
+ private String baseUrl;
+
+
+ /**
+ * 获取商户的私钥文件
+ * @param keyPemPath
+ * @return
+ */
+ public PrivateKey getPrivateKey(String keyPemPath){
+
+ InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(keyPemPath);
+ if(inputStream==null){
+ throw new RuntimeException("私钥文件不存在");
+ }
+ return PemUtil.loadPrivateKey(inputStream);
+ }
+//
+// /**
+// * 获取证书管理器实例
+// * @return
+// */
+// @Bean
+// public Verifier getVerifier() throws GeneralSecurityException, IOException, HttpCodeException, NotFoundException {
+//
+// log.info("获取证书管理器实例");
+//
+// //获取商户私钥
+// PrivateKey privateKey = getPrivateKey(keyPemPath);
+//
+// //私钥签名对象
+// PrivateKeySigner privateKeySigner = new PrivateKeySigner(serialNo, privateKey);
+//
+// //身份认证对象
+// WechatPay2Credentials wechatPay2Credentials = new WechatPay2Credentials(mchId, privateKeySigner);
+//
+// // 使用定时更新的签名验证器,不需要传入证书
+// CertificatesManager certificatesManager = CertificatesManager.getInstance();
+// certificatesManager.putMerchant(mchId,wechatPay2Credentials,apiV3Key.getBytes(StandardCharsets.UTF_8));
+//
+// return certificatesManager.getVerifier(mchId);
+// }
+
+
+
+ @Bean
+ public Verifier getVerifier() throws GeneralSecurityException, IOException, HttpCodeException, NotFoundException {
+ log.info("开始获取微信支付证书管理器实例");
+
+ // 验证关键参数
+ log.debug("商户号: {}", mchId);
+ log.debug("证书序列号: {}", serialNo);
+ log.debug("APIv3密钥长度: {}", apiV3Key.length()); // 不记录具体密钥内容
+
+ // 获取商户私钥
+ PrivateKey privateKey = getPrivateKey(keyPemPath);
+ if (privateKey == null) {
+ throw new IllegalArgumentException("无法从路径加载私钥: " + keyPemPath);
+ }
+
+ // 创建签名器
+ PrivateKeySigner privateKeySigner = new PrivateKeySigner(serialNo, privateKey);
+ WechatPay2Credentials wechatPay2Credentials = new WechatPay2Credentials(mchId, privateKeySigner);
+
+ try {
+ CertificatesManager certificatesManager = CertificatesManager.getInstance();
+
+ // 显式设置域名(如果库需要)
+ // certificatesManager.setDomain("api.mch.weixin.qq.com");
+
+ // 添加商户信息
+ certificatesManager.putMerchant(mchId, wechatPay2Credentials, apiV3Key.getBytes(StandardCharsets.UTF_8));
+
+ // 获取验证器
+ Verifier verifier = certificatesManager.getVerifier(mchId);
+ log.info("成功获取证书管理器实例");
+ return verifier;
+ } catch (HttpCodeException e) {
+ log.error("微信支付API返回错误: "+ e);
+ throw e;
+ } catch (Exception e) {
+ log.error("获取证书管理器实例时发生错误", e);
+ throw e;
+ }
+ }
+
+
+ /**
+ * 获取支付http请求对象
+ * @param verifier
+ * @return
+ */
+ @Bean(name = "wxPayClient")
+ public CloseableHttpClient getWxPayClient(Verifier verifier) {
+
+ //获取商户私钥
+ PrivateKey privateKey = getPrivateKey(keyPemPath);
+
+ WechatPayHttpClientBuilder builder = WechatPayHttpClientBuilder.create()
+ .withMerchant(mchId, serialNo, privateKey)
+ .withValidator(new WechatPay2Validator(verifier));
+
+ // 通过WechatPayHttpClientBuilder构造的HttpClient,会自动的处理签名和验签,并进行证书自动更新
+ return builder.build();
+ }
+
+ /**
+ * 获取HttpClient,无需进行应答签名验证,跳过验签的流程
+ */
+ @Bean(name = "wxPayNoSignClient")
+ public CloseableHttpClient getWxPayNoSignClient(){
+
+ //获取商户私钥
+ PrivateKey privateKey = getPrivateKey(keyPemPath);
+
+ //用于构造HttpClient
+ WechatPayHttpClientBuilder builder = WechatPayHttpClientBuilder.create()
+ //设置商户信息
+ .withMerchant(mchId, serialNo, privateKey)
+ //无需进行签名验证、通过withValidator((response) -> true)实现
+ .withValidator((response) -> true);
+
+ // 通过WechatPayHttpClientBuilder构造的HttpClient,会自动的处理签名和验签,并进行证书自动更新
+ return builder.build();
+ }
+
+
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/cityMoneyLog/CityMoneyLogList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/cityMoneyLog/CityMoneyLogList.vue
new file mode 100644
index 0000000..c3ad481
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/cityMoneyLog/CityMoneyLogList.vue
@@ -0,0 +1,253 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 重置
+
+ {{ toggleSearchStatus ? '收起' : '展开' }}
+
+
+
+
+
+
+
+
+
+
+
+
新增
+
导出
+
+ 导入
+
+
+
+
+
+ 删除
+
+ 批量操作
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 无图片
+
+
+
+ 无文件
+
+ 下载
+
+
+
+
+ 编辑
+
+
+
+ 更多
+
+
+ 详情
+
+
+ handleDelete(record.id)">
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/cityMoneyLog/modules/CityMoneyLogForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/cityMoneyLog/modules/CityMoneyLogForm.vue
new file mode 100644
index 0000000..7ca8a60
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/cityMoneyLog/modules/CityMoneyLogForm.vue
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/cityMoneyLog/modules/CityMoneyLogModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/cityMoneyLog/modules/CityMoneyLogModal.Style#Drawer.vue
new file mode 100644
index 0000000..2e89754
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/cityMoneyLog/modules/CityMoneyLogModal.Style#Drawer.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/cityMoneyLog/modules/CityMoneyLogModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/cityMoneyLog/modules/CityMoneyLogModal.vue
new file mode 100644
index 0000000..f1f603a
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/cityMoneyLog/modules/CityMoneyLogModal.vue
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/controller/CityMoneyLogController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/controller/CityMoneyLogController.java
index c22493b..c8ca0c2 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/controller/CityMoneyLogController.java
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/controller/CityMoneyLogController.java
@@ -1,18 +1,30 @@
package org.jeecg.modules.cityMoneyLog.controller;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
+import java.security.cert.X509Certificate;
+import java.util.*;
import java.util.stream.Collectors;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
+import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+
+import org.jeecg.config.HttpRequestUtil;
+import org.jeecg.config.MoneyUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.toolkit.IdWorker;
+import com.wechat.pay.contrib.apache.httpclient.util.RsaCryptoUtil;
import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.RedisUtil;
import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.config.pay.WeChatPayConfig2;
import org.jeecg.modules.cityMoneyLog.entity.CityMoneyLog;
+import org.jeecg.modules.cityMoneyLog.req.TransferBatchesDetailsRequest;
+import org.jeecg.modules.cityMoneyLog.req.TransferBatchesRequest;
+import org.jeecg.modules.cityMoneyLog.resp.TransferBatchesResp;
import org.jeecg.modules.cityMoneyLog.service.ICityMoneyLogService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -20,6 +32,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
+import org.jeecg.modules.hanHaiMember.entity.HanHaiMember;
+import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@@ -27,6 +41,7 @@ import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
@@ -39,7 +54,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
/**
* @Description: 佣金流水
* @Author: jeecg-boot
- * @Date: 2024-12-04
+ * @Date: 2025-03-30
* @Version: V1.0
*/
@Api(tags="佣金流水")
@@ -49,6 +64,26 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class CityMoneyLogController extends JeecgController {
@Autowired
private ICityMoneyLogService cityMoneyLogService;
+ @Resource
+ private IHanHaiMemberService hanHaiMemberService;
+ @Resource
+ private RedisUtil redisUtil;
+ @Resource
+ private WeChatPayConfig2 weChatPayConfig2;
+ @Value("${wxpay.appId}")
+ private String appId;
+ @Value("${wxpay.transferBatchUrl}")
+ private String transferBatchUrl;
+ @Value("${wxpay.keyPemPath}")
+ private String pemPath;
+ @Value("${wxpay.mchId}")
+ private String mchId;
+ @Value("${wxpay.serialNo}")
+ private String wxsSerialNo;
+ @Value("${wxpay.apiV3Key}")
+ private String apiV3Key;
+ @Value("${wxpay.withdrawalNotifyUrl}")
+ private String withdrawalNotifyUrl;
/**
* 分页列表查询
@@ -67,6 +102,7 @@ public class CityMoneyLogController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(cityMoneyLog, req.getParameterMap());
+ queryWrapper.eq("type",0);
Page page = new Page(pageNo, pageSize);
IPage pageList = cityMoneyLogService.page(page, queryWrapper);
return Result.OK(pageList);
@@ -89,15 +125,82 @@ public class CityMoneyLogController extends JeecgController edit(@RequestBody CityMoneyLog cityMoneyLog) {
- cityMoneyLogService.updateById(cityMoneyLog);
- return Result.OK("编辑成功!");
+ public Result edit(@RequestBody CityMoneyLog hanHaiWater) {
+ HanHaiMember hanHaiMember = hanHaiMemberService.getById(hanHaiWater.getUserId());
+ Integer n = (Integer) redisUtil.get("WITHDRAWAL:" + hanHaiWater.getId());
+ if (n != null) {
+ throw new JeecgBootException("请勿重复点击,后果自负!");
+ }
+ redisUtil.set("WITHDRAWAL:" + hanHaiWater.getId(), 1, 5);
+
+ //微信-商家转账到零钱
+
+ String idStr = "H" + IdWorker.getIdStr();
+ TransferBatchesRequest transferBatchesRequest = new TransferBatchesRequest();
+
+ transferBatchesRequest.setAppid(appId);
+ transferBatchesRequest.setOutBillNo(idStr);
+ transferBatchesRequest.setTransferRemark("商家提现");
+ transferBatchesRequest.setOpenid(hanHaiMember.getAppletOpenid());
+ transferBatchesRequest.setTransferSceneId("1005");
+ transferBatchesRequest.setNotifyUrl(withdrawalNotifyUrl);
+ String serialNo = null;
+ //加密真实姓名
+ try {
+
+ X509Certificate certificate = weChatPayConfig2.getVerifier().getValidCertificate();
+ serialNo = certificate.getSerialNumber().toString(16).toUpperCase();
+ //这里放真实姓名,目前你的数据库表没有这个字段
+ String encryptOAEP = RsaCryptoUtil.encryptOAEP(hanHaiWater.getName(), certificate);
+ transferBatchesRequest.setUserName(encryptOAEP);
+ } catch (Exception e) {
+ log.info("真实姓名加密失败");
+ e.printStackTrace();
+ throw new JeecgBootException("真实姓名加密失败");
+ }
+ transferBatchesRequest.setTransferAmount(MoneyUtil.Yuan2Fen(hanHaiWater.getPrice().doubleValue()));
+ List transferBatchesDetailsRequests = new ArrayList<>();
+ TransferBatchesDetailsRequest transferBatchesDetailsRequest = new TransferBatchesDetailsRequest();
+ transferBatchesDetailsRequest.setInfoType("岗位类型");
+ transferBatchesDetailsRequest.setInfoContent("销售员");
+ TransferBatchesDetailsRequest transferBatchesDetailsRequest2 = new TransferBatchesDetailsRequest();
+ transferBatchesDetailsRequest2.setInfoType("报酬说明");
+ transferBatchesDetailsRequest2.setInfoContent("佣金报酬");
+
+
+ transferBatchesDetailsRequests.add(transferBatchesDetailsRequest);
+ transferBatchesDetailsRequests.add(transferBatchesDetailsRequest2);
+ transferBatchesRequest.setTransferDetailList(transferBatchesDetailsRequests);
+ String jsonString = JSONObject.toJSONString(transferBatchesRequest);
+
+ log.info("请求参数:"+jsonString);
+
+ String postTransBatRequest = HttpRequestUtil.postTransBatRequest(transferBatchUrl, jsonString, serialNo, wxsSerialNo, mchId, pemPath);
+ log.error("返回结果1:" + postTransBatRequest);
+ TransferBatchesResp transferBatchesResp = JSON.parseObject(postTransBatRequest, TransferBatchesResp.class);
+ log.error("返回结果2:" + transferBatchesResp);
+ if (transferBatchesResp == null || org.apache.commons.lang3.StringUtils.isBlank(transferBatchesResp.getOutBillNo()) || transferBatchesResp.getState().equals("FAIL")) {
+ throw new JeecgBootException("打款失败");
+ }
+
+ //这里写自己的逻辑,比如改变这条记录的状态,变成提现成功
+
+ CityMoneyLog hanHaiWater1 = new CityMoneyLog();
+ hanHaiWater1.setId(hanHaiWater.getId());
+ hanHaiWater1.setState(1);
+ hanHaiWater1.setPackageInfo(transferBatchesResp.getPackageInfo());
+ hanHaiWater1.setOutBatchNo(transferBatchesResp.getOutBillNo());
+ hanHaiWater1.setBatchId(transferBatchesResp.getTransferBillNo());
+ cityMoneyLogService.updateById(hanHaiWater1);
+
+
+ return Result.OK("提现成功");
}
/**
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/entity/CityMoneyLog.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/entity/CityMoneyLog.java
index d3a8355..5edc013 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/entity/CityMoneyLog.java
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/entity/CityMoneyLog.java
@@ -20,7 +20,7 @@ import lombok.experimental.Accessors;
/**
* @Description: 佣金流水
* @Author: jeecg-boot
- * @Date: 2024-12-04
+ * @Date: 2025-03-30
* @Version: V1.0
*/
@Data
@@ -50,21 +50,47 @@ public class CityMoneyLog implements Serializable {
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
- /**金额*/
- @Excel(name = "金额", width = 15)
- @ApiModelProperty(value = "金额")
- private java.math.BigDecimal intger;
/**用户*/
@Excel(name = "用户", width = 15, dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@Dict(dictTable = "han_hai_member", dicText = "nick_name", dicCode = "id")
@ApiModelProperty(value = "用户")
private java.lang.String userId;
- /**类型0获得1消耗*/
- @Excel(name = "类型0获得1消耗", width = 15)
- @ApiModelProperty(value = "类型0获得1消耗")
- private java.lang.Integer type;
- /**名称*/
- @Excel(name = "名称", width = 15)
- @ApiModelProperty(value = "名称")
+ /**提现者姓名*/
+ @Excel(name = "提现者姓名", width = 15)
+ @ApiModelProperty(value = "提现者姓名")
+ private java.lang.String name;
+ /**流水备注*/
+ @Excel(name = "流水备注", width = 15)
+ @ApiModelProperty(value = "流水备注")
private java.lang.String title;
+ /**金额*/
+ @Excel(name = "金额", width = 15)
+ @ApiModelProperty(value = "金额")
+ private java.math.BigDecimal price;
+ /**状态*/
+ @Excel(name = "状态", width = 15, dicCode = "money_pay_state")
+ @Dict(dicCode = "money_pay_state")
+ @ApiModelProperty(value = "状态")
+ private java.lang.Integer state;
+ /**到账时间*/
+ @Excel(name = "到账时间", width = 15)
+ @ApiModelProperty(value = "到账时间")
+ private java.util.Date successtime;
+ /**类型*/
+ @Excel(name = "类型", width = 15, dicCode = "money_pay")
+ @Dict(dicCode = "money_pay")
+ @ApiModelProperty(value = "类型")
+ private java.lang.Integer type;
+ /**回调*/
+ @Excel(name = "回调", width = 15)
+ @ApiModelProperty(value = "回调")
+ private java.lang.String packageInfo;
+ /**标识*/
+ @Excel(name = "标识", width = 15)
+ @ApiModelProperty(value = "标识")
+ private java.lang.String outBatchNo;
+ /**内容*/
+ @Excel(name = "内容", width = 15)
+ @ApiModelProperty(value = "内容")
+ private java.lang.String batchId;
}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/mapper/CityMoneyLogMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/mapper/CityMoneyLogMapper.java
index 24a7d0b..da55278 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/mapper/CityMoneyLogMapper.java
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/mapper/CityMoneyLogMapper.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 佣金流水
* @Author: jeecg-boot
- * @Date: 2024-12-04
+ * @Date: 2025-03-30
* @Version: V1.0
*/
public interface CityMoneyLogMapper extends BaseMapper {
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/req/TransferBatchesDetailsRequest.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/req/TransferBatchesDetailsRequest.java
new file mode 100644
index 0000000..4d1f2cb
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/req/TransferBatchesDetailsRequest.java
@@ -0,0 +1,25 @@
+package org.jeecg.modules.cityMoneyLog.req;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+
+/**
+ * @author java996.icu
+ * @title: TransferBatchesDetailsRequest
+ * @projectName merchant
+ * @description: TODO
+ * @date 2022/10/10 15:45
+ * @Version V1.0
+ */
+@Data
+public class TransferBatchesDetailsRequest {
+
+ /**转账场景为1000-现金营销,需填入活动名称、奖励说明*/
+ @JSONField(name = "info_type")
+ private String infoType;
+ /**信息类型为活动名称,请在信息内容描述用户参与活动的名称,如新会员有礼
+ 信息类型为奖励说明,请在信息内容描述用户因为什么奖励获取这笔资金,如注册会员抽奖一等奖*/
+ @JSONField(name = "info_content")
+ private String infoContent;
+
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/req/TransferBatchesRequest.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/req/TransferBatchesRequest.java
new file mode 100644
index 0000000..308eaef
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/req/TransferBatchesRequest.java
@@ -0,0 +1,45 @@
+package org.jeecg.modules.cityMoneyLog.req;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author java996.icu
+ * @title: TransferBatchesRequest
+ * @projectName merchant
+ * @description: TODO
+ * @date 2022/10/10 15:32
+ * @Version V1.0
+ */
+@Data
+public class TransferBatchesRequest {
+
+ /**直连商户的appid*/
+ private String appid;
+ /**商家批次单号*/
+ @JSONField(name = "out_bill_no")
+ private String outBillNo;
+ /**批次备注*/
+ @JSONField(name = "transfer_remark")
+ private String transferRemark;
+ /**转账总金额*/
+ @JSONField(name = "transfer_amount")
+ private Integer transferAmount;
+ /**转账场景*/
+ @JSONField(name = "transfer_scene_id")
+ private String transferSceneId;
+ @JSONField(name = "openid")
+ private String openid;
+ /**真实姓名*/
+ @JSONField(name = "user_name")
+ private String userName;
+ /**回调地址*/
+ @JSONField(name = "notify_url")
+ private String notifyUrl;
+ /**发起批量转账的明细列表,最多三千笔*/
+ @JSONField(name = "transfer_scene_report_infos")
+ private List transferDetailList;
+
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/resp/TransferBatchNotifyResourceResp.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/resp/TransferBatchNotifyResourceResp.java
new file mode 100644
index 0000000..5a6d3f9
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/resp/TransferBatchNotifyResourceResp.java
@@ -0,0 +1,32 @@
+package org.jeecg.modules.cityMoneyLog.resp;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+
+@Data
+public class TransferBatchNotifyResourceResp {
+
+ /**
+ * 加密算法类型
+ * 对开启结果数据进行加密的加密算法,目前只支持AEAD_AES_256_GCM
+ */
+ @JSONField(name = "algorithm")
+ private String algorithm;
+ /**
+ * 数据密文
+ * Base64编码后的商家转账结果数据密文
+ */
+ @JSONField(name = "ciphertext")
+ private String ciphertext;
+ /**附加数据*/
+ @JSONField(name = "associated_data")
+ private String associatedData;
+ /**原始回调类型,为mch_payment*/
+ @JSONField(name = "original_type")
+ private String originalType;
+ /**加密使用的随机串*/
+ @JSONField(name = "nonce")
+ private String nonce;
+
+
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/resp/TransferBatchResourceDataResp.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/resp/TransferBatchResourceDataResp.java
new file mode 100644
index 0000000..958e041
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/resp/TransferBatchResourceDataResp.java
@@ -0,0 +1,51 @@
+package org.jeecg.modules.cityMoneyLog.resp;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+
+@Data
+public class TransferBatchResourceDataResp {
+
+ /**微信批次单号*/
+ @JSONField(name = "out_bill_no")
+ private String outBillNo;
+ /**商家批次单号*/
+ @JSONField(name = "transfer_bill_no")
+ private String transferBillNo;
+ /**
+ * 商家转账订单状态
+ * ACCEPTED: 转账已受理
+ *
+ * PROCESSING: 转账处理中,转账结果尚未明确,如一直处于此状态,建议检查账户余额是否足够
+ *
+ * WAIT_USER_CONFIRM: 待收款用户确认,可拉起微信收款确认页面进行收款确认
+ *
+ * TRANSFERING: 转账结果尚未明确,可拉起微信收款确认页面再次重试确认收款
+ *
+ * SUCCESS: 转账成功
+ *
+ * FAIL: 转账失败
+ *
+ * CANCELING: 商户撤销请求受理成功,该笔转账正在撤销中
+ *
+ * CANCELLED: 转账撤销完成
+ * */
+ @JSONField(name = "state")
+ private String state;
+ /**失败原因*/
+ @JSONField(name = "fail_reason")
+ private String failReason;
+ /**商户号*/
+ @JSONField(name = "mch_id")
+ private String mchId;
+ /**转账总金额,单位为“分”*/
+ @JSONField(name = "transfer_amount")
+ private Integer transferAmount;
+ @JSONField(name = "openid")
+ private String openid;
+ @JSONField(name = "create_time")
+ private String createTime;
+ @JSONField(name = "update_time")
+ private String updateTime;
+
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/resp/TransferBatchesNotifyResp.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/resp/TransferBatchesNotifyResp.java
new file mode 100644
index 0000000..a5c80cc
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/resp/TransferBatchesNotifyResp.java
@@ -0,0 +1,31 @@
+package org.jeecg.modules.cityMoneyLog.resp;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+
+@Data
+public class TransferBatchesNotifyResp {
+
+ private String id;
+ @JSONField(name = "create_time")
+ private String createTime;
+ /**
+ * 通知类型
+ * 通知的类型,商家转账通知的类型为MCHTRANSFER.BILL.FINISHED
+ * */
+ @JSONField(name = "event_type")
+ private String eventType;
+ /**
+ * 通知类型
+ * 通知的资源数据类型,商家转账通知为encrypt-resource
+ * */
+ @JSONField(name = "resource_type")
+ private String resourceType;
+ /**通知数据*/
+ @JSONField(name = "resource")
+ private TransferBatchNotifyResourceResp resource;
+ /**回调摘要*/
+ @JSONField(name = "summary")
+ private String summary;
+
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/resp/TransferBatchesResp.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/resp/TransferBatchesResp.java
new file mode 100644
index 0000000..291194a
--- /dev/null
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/resp/TransferBatchesResp.java
@@ -0,0 +1,53 @@
+package org.jeecg.modules.cityMoneyLog.resp;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import lombok.Data;
+
+/**
+ * @author java996.icu
+ * @title: TransferBatchesResp
+ * @projectName merchant
+ * @description: TODO
+ * @date 2022/12/13 14:29
+ * @Version V1.0
+ */
+@Data
+public class TransferBatchesResp {
+
+ /**微信批次单号*/
+ @JSONField(name = "out_bill_no")
+ private String outBillNo;
+ /**商家批次单号*/
+ @JSONField(name = "transfer_bill_no")
+ private String transferBillNo;
+ /**批次创建时间*/
+ @JSONField(name = "create_time")
+ private String createTime;
+ /**商家转账订单状态
+ * ACCEPTED: 转账已受理
+ *
+ * PROCESSING: 转账处理中,转账结果尚未明确,如一直处于此状态,建议检查账户余额是否足够
+ *
+ * WAIT_USER_CONFIRM: 待收款用户确认,可拉起微信收款确认页面进行收款确认
+ *
+ * TRANSFERING: 转账结果尚未明确,可拉起微信收款确认页面再次重试确认收款
+ *
+ * SUCCESS: 转账成功
+ *
+ * FAIL: 转账失败
+ *
+ * CANCELING: 商户撤销请求受理成功,该笔转账正在撤销中
+ *
+ * CANCELLED: 转账撤销完成
+ * */
+ @JSONField(name = "state")
+ private String state;
+
+ /**失败原因*/
+ @JSONField(name = "fail_reason")
+ private String failReason;
+ /**跳转领取页面的package信息*/
+ @JSONField(name = "package_info")
+ private String packageInfo;
+
+}
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/service/ICityMoneyLogService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/service/ICityMoneyLogService.java
index 120c948..dc94217 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/service/ICityMoneyLogService.java
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/service/ICityMoneyLogService.java
@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 佣金流水
* @Author: jeecg-boot
- * @Date: 2024-12-04
+ * @Date: 2025-03-30
* @Version: V1.0
*/
public interface ICityMoneyLogService extends IService {
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/service/impl/CityMoneyLogServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/service/impl/CityMoneyLogServiceImpl.java
index 42bf87b..c81d43c 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/service/impl/CityMoneyLogServiceImpl.java
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/service/impl/CityMoneyLogServiceImpl.java
@@ -10,7 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 佣金流水
* @Author: jeecg-boot
- * @Date: 2024-12-04
+ * @Date: 2025-03-30
* @Version: V1.0
*/
@Service
diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue3/CityMoneyLog.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue3/CityMoneyLog.data.ts
index 41b832b..8c52ea4 100644
--- a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue3/CityMoneyLog.data.ts
+++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/cityMoneyLog/vue3/CityMoneyLog.data.ts
@@ -5,9 +5,10 @@ import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
{
- title: '金额',
+ title: '创建日期',
align:"center",
- dataIndex: 'intger'
+ sorter: true,
+ dataIndex: 'createTime'
},
{
title: '用户',
@@ -15,26 +16,74 @@ export const columns: BasicColumn[] = [
dataIndex: 'userId_dictText'
},
{
- title: '类型0获得1消耗',
+ title: '提现者姓名',
align:"center",
- dataIndex: 'type'
+ dataIndex: 'name'
},
{
- title: '名称',
+ title: '流水备注',
align:"center",
dataIndex: 'title'
},
+ {
+ title: '金额',
+ align:"center",
+ dataIndex: 'price'
+ },
+ {
+ title: '状态',
+ align:"center",
+ dataIndex: 'state_dictText'
+ },
+ {
+ title: '到账时间',
+ align:"center",
+ dataIndex: 'successtime'
+ },
+ {
+ title: '类型',
+ align:"center",
+ dataIndex: 'type_dictText'
+ },
+ {
+ title: '回调',
+ align:"center",
+ dataIndex: 'packageInfo'
+ },
+ {
+ title: '标识',
+ align:"center",
+ dataIndex: 'outBatchNo'
+ },
+ {
+ title: '内容',
+ align:"center",
+ dataIndex: 'batchId'
+ },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
+ {
+ label: "状态",
+ field: "state",
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"money_pay_state"
+ },
+ colProps: {span: 6},
+ },
+ {
+ label: "类型",
+ field: "type",
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"money_pay"
+ },
+ colProps: {span: 6},
+ },
];
//表单数据
export const formSchema: FormSchema[] = [
- {
- label: '金额',
- field: 'intger',
- component: 'InputNumber',
- },
{
label: '用户',
field: 'userId',
@@ -44,13 +93,54 @@ export const formSchema: FormSchema[] = [
},
},
{
- label: '类型0获得1消耗',
- field: 'type',
- component: 'InputNumber',
+ label: '提现者姓名',
+ field: 'name',
+ component: 'Input',
},
{
- label: '名称',
+ label: '流水备注',
field: 'title',
component: 'Input',
},
+ {
+ label: '金额',
+ field: 'price',
+ component: 'InputNumber',
+ },
+ {
+ label: '状态',
+ field: 'state',
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"money_pay_state"
+ },
+ },
+ {
+ label: '到账时间',
+ field: 'successtime',
+ component: 'Input',
+ },
+ {
+ label: '类型',
+ field: 'type',
+ component: 'JDictSelectTag',
+ componentProps:{
+ dictCode:"money_pay"
+ },
+ },
+ {
+ label: '回调',
+ field: 'packageInfo',
+ component: 'Input',
+ },
+ {
+ label: '标识',
+ field: 'outBatchNo',
+ component: 'Input',
+ },
+ {
+ label: '内容',
+ field: 'batchId',
+ component: 'Input',
+ },
];
diff --git a/jeecg-boot-module-system/pom.xml b/jeecg-boot-module-system/pom.xml
index 4ae1645..22295d6 100644
--- a/jeecg-boot-module-system/pom.xml
+++ b/jeecg-boot-module-system/pom.xml
@@ -73,6 +73,11 @@
3.2.0
compile
+
+ com.github.wechatpay-apiv3
+ wechatpay-java
+ ${wechatpay-java.version}
+
diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/WxQrCodeVo.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/WxQrCodeVo.java
index 6a8ef7b..452b52e 100644
--- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/WxQrCodeVo.java
+++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/bean/WxQrCodeVo.java
@@ -1,14 +1,13 @@
package org.jeecg.modules.api.bean;
-import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class WxQrCodeVo {
- /**图片地址*/
- @ApiModelProperty(value = "图片地址")
+
+
private String url;
- @ApiModelProperty(value = "加油站名称")
+
private String name;
}
diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuOrderServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuOrderServiceImpl.java
index 5f281d9..0287af8 100644
--- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuOrderServiceImpl.java
+++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/service/impl/YaoDuOrderServiceImpl.java
@@ -473,7 +473,7 @@ public class YaoDuOrderServiceImpl implements YaoDuOrderService {
// //增加佣金流水
CityMoneyLog cityMoneyLog = new CityMoneyLog();
cityMoneyLog.setCreateTime(new Date());
- cityMoneyLog.setIntger(money);
+ cityMoneyLog.setPrice(money);
cityMoneyLog.setType(1);
cityMoneyLog.setUserId(hanHaiMember1.getId());
cityMoneyLog.setTitle("好友["+hanHaiMember.getNickName()+"]下单获得佣金");
@@ -520,7 +520,7 @@ public class YaoDuOrderServiceImpl implements YaoDuOrderService {
//增加佣金流水
CityMoneyLog cityMoneyLog = new CityMoneyLog();
cityMoneyLog.setCreateTime(new Date());
- cityMoneyLog.setIntger(byId.getGiveMoney());
+ cityMoneyLog.setPrice(byId.getGiveMoney());
cityMoneyLog.setType(1);
cityMoneyLog.setUserId(byId1.getId());
cityMoneyLog.setTitle("好友["+hanHaiMember.getNickName()+"]开通会员获得佣金");
diff --git a/jeecg-boot-module-system/src/main/resources/apiclient_cert.p12 b/jeecg-boot-module-system/src/main/resources/apiclient_cert.p12
new file mode 100644
index 0000000..c60d450
Binary files /dev/null and b/jeecg-boot-module-system/src/main/resources/apiclient_cert.p12 differ
diff --git a/jeecg-boot-module-system/src/main/resources/apiclient_cert.pem b/jeecg-boot-module-system/src/main/resources/apiclient_cert.pem
new file mode 100644
index 0000000..da66b1a
--- /dev/null
+++ b/jeecg-boot-module-system/src/main/resources/apiclient_cert.pem
@@ -0,0 +1,25 @@
+-----BEGIN CERTIFICATE-----
+MIIELjCCAxagAwIBAgIUJG7Xen+IKln9eZk9Cf3SupqGj/4wDQYJKoZIhvcNAQEL
+BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
+FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
+Q0EwHhcNMjUwNTMwMTA1NzMzWhcNMzAwNTI5MTA1NzMzWjCBhzETMBEGA1UEAwwK
+MTY3MzUxNjE3NjEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMTMwMQYDVQQL
+DCrmuZbljZfngJrmtbfpu47mmI7kv6Hmga/np5HmioDmnInpmZDlhazlj7gxCzAJ
+BgNVBAYTAkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBALAOE2yiLLnpUg7/iVTEZeORO0W7AUdL3zskg4I0aT997pbw
+CpeSV+6K83+QlcWKnpdG0WkS9xqRgIuA/WZPYJVJG1iDUo+ndYNofx1UpZxfzvQq
+zSZTB1GnxIHHJQTvWF7CpxWXNKRcFmVRx5TKorL3BqYrqD/FgUBKIJNWUgEsVqJs
+EW8dv2iBYZdIHB51rc3wWsr2X28SGmBVOSCbG2gEkmgQr7yS7KpzE2rfl2PfsnWs
+KQBSX9KMToXRmEIwHVAGmWXV5RlzBACk1vOSz3Cp+GgKFcOPqrFg2pJOXwSyVUL5
+WUc6t6xDqnkfg9bO5za1v4Q8S7fxK5NhMIChXVsCAwEAAaOBuTCBtjAJBgNVHRME
+AjAAMAsGA1UdDwQEAwID+DCBmwYDVR0fBIGTMIGQMIGNoIGKoIGHhoGEaHR0cDov
+L2V2Y2EuaXRydXMuY29tLmNuL3B1YmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUw
+REJDMDRCMDZBRDM5NzU0OTg0NkMwMUMzRThFQkQyJnNnPUhBQ0M0NzFCNjU0MjJF
+MTJCMjdBOUQzM0E4N0FEMUNERjU5MjZFMTQwMzcxMA0GCSqGSIb3DQEBCwUAA4IB
+AQBjK72tgf+Fn+9qxWhiiwyow6MtIE3arbPDhB/3WfKjHp7AA6eqdGPMrUvfufYv
+evM2I7ZJWsk6IiJMJlweyBalqn84Aq3raurEoL5Y+jPjXqLHTrcUfyIiGpbF8Auy
+bpW1pl1w2GqRnA17Ep/o0Na+9KOX+iBvv1Lm/LJnwlxJaSaOU2PFRS5QT8NRuV2/
+82/FFnFfM+rDk98YjLVtob45tBKIkBeRJZ+Zsz5a7SBYnR2eVW6YgOS0fFtBI9Q/
+6fuMHLbuAH9/xubPG6K4bHwVyNGHCeDp4GjfuOX/DSw49qVGiy5GxYGCczgNta+L
+hlDUuptj8HhkGjrExeXfZQsR
+-----END CERTIFICATE-----
diff --git a/jeecg-boot-module-system/src/main/resources/apiclient_key.pem b/jeecg-boot-module-system/src/main/resources/apiclient_key.pem
new file mode 100644
index 0000000..abafafe
--- /dev/null
+++ b/jeecg-boot-module-system/src/main/resources/apiclient_key.pem
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxK2wqQooeGKkAQchZdwK
+U3qFiPSyf83l7USGGAdEhb78iq0Dvi7RfgdHuqSVBv0fnSQJicNO+s10ofi9waxl
+SCPnuO8t9MeOuS4IpZ54VWY/9pJ5A2Z0x49L0djoFWStFCpKzsg2fWBvc/7kYVFr
+nq/jFyRho8/GZtxL9RLZjWLyfnpe+erxSNFEnQLoW6LC4D5L0w9oiHboHmN9Igzc
+uB6pIuMwccImX1xPeu/jx2QMYrxAW/2bW3e6z4ojQWqhRtFq55INnXLV8VXE7rwI
+1L0RB4R39JOsKroVE/g7SiHRbGEem2BbNaAFhjCMuZzpWSCFQkTlxLJMxxTt9j0S
++wIDAQAB
+-----END PUBLIC KEY-----
diff --git a/jeecg-boot-module-system/src/main/resources/application-dev.yml b/jeecg-boot-module-system/src/main/resources/application-dev.yml
index b52598c..acf1602 100644
--- a/jeecg-boot-module-system/src/main/resources/application-dev.yml
+++ b/jeecg-boot-module-system/src/main/resources/application-dev.yml
@@ -334,7 +334,27 @@ third-app:
wechat:
mpAppId: wxa4d29e67e8a58d38
mpAppSecret: 866e4ba72bd86a4c79403b6b1341461b
- mchId:
- mchKey:
- keyPath:
- notifyUrl:
+
+
+wxpay:
+ #应用编号
+ appId: wxa4d29e67e8a58d38
+ #商户号
+ mchId: 1673516176
+ # APIv2密钥
+ apiKey: GVIP1008611ABCDEFGGGGJKHLOSJFLGK
+ # APIv3密钥
+ apiV3Key: GVIP1008611ABCDEFGGGGJKHLOSJFLGK
+ # 微信支付V3-url前缀
+ baseUrl: https://api.mch.weixin.qq.com
+ # 支付通知回调, pjm6m9.natappfree.cc 为内网穿透地址
+ notifyUrl: https://admin.ytonggao.com/a-notice-api/hanHaiWater/hanHaiWater/withdrawal/notify
+ # 退款通知回调, pjm6m9.natappfree.cc 为内网穿透地址
+ refundNotifyUrl: https://admin.ytonggao.com/a-notice-api/hanHaiWater/hanHaiWater/withdrawal/notify
+ # 密钥路径,resources根目录下
+ keyPemPath: apiclient_key.pem
+ #商户证书序列号
+ serialNo: 246ED77A7F882A59FD79993D09FDD2BA9A868FFE
+ #转账到零钱
+ transferBatchUrl: https://api.mch.weixin.qq.com/v3/fund-app/mch-transfer/transfer-bills
+ withdrawalNotifyUrl: https://admin.ytonggao.com/a-notice-api/hanHaiWater/hanHaiWater/withdrawal/notify
\ No newline at end of file
diff --git a/jeecg-boot-module-system/src/main/resources/pay_weixin.properties b/jeecg-boot-module-system/src/main/resources/pay_weixin.properties
index 873d438..604e3ce 100644
--- a/jeecg-boot-module-system/src/main/resources/pay_weixin.properties
+++ b/jeecg-boot-module-system/src/main/resources/pay_weixin.properties
@@ -1,7 +1,7 @@
pay.mchId=1673516176
pay.appId=wxa4d29e67e8a58d38
pay.mchKey=GVIP1008611ABCDEFGGGGJKHLOSJFLGK
-pay.keyPath=
+pay.keyPath=classpath:apiclient_cert.pem
pay.notifyUrl=http://h5.xzaiyp.top/api/order/payNotify
pay.notifyUrlDev=http://h5.xzaiyp.top/api/order/payNotify
pay.notifyVipUrl=http://h5.xzaiyp.top/api/order/vipPayNotify
diff --git a/jeecg-boot-module-system/src/main/resources/证书使用说明.txt b/jeecg-boot-module-system/src/main/resources/证书使用说明.txt
new file mode 100644
index 0000000..9a0aab1
--- /dev/null
+++ b/jeecg-boot-module-system/src/main/resources/证书使用说明.txt
@@ -0,0 +1,18 @@
+欢迎使用微信支付!
+附件中的三份文件(证书pkcs12格式、证书pem格式、证书密钥pem格式),为接口中强制要求时需携带的证书文件。
+证书属于敏感信息,请妥善保管不要泄露和被他人复制。
+不同开发语言下的证书格式不同,以下为说明指引:
+ 证书pkcs12格式(apiclient_cert.p12)
+ 包含了私钥信息的证书文件,为p12(pfx)格式,由微信支付签发给您用来标识和界定您的身份
+ 部分安全性要求较高的API需要使用该证书来确认您的调用身份
+ windows上可以直接双击导入系统,导入过程中会提示输入证书密码,证书密码默认为您的商户号(如:1900006031)
+ 证书pem格式(apiclient_cert.pem)
+ 从apiclient_cert.p12中导出证书部分的文件,为pem格式,请妥善保管不要泄漏和被他人复制
+ 部分开发语言和环境,不能直接使用p12文件,而需要使用pem,所以为了方便您使用,已为您直接提供
+ 您也可以使用openssl命令来自己导出:openssl pkcs12 -clcerts -nokeys -in apiclient_cert.p12 -out apiclient_cert.pem
+ 证书密钥pem格式(apiclient_key.pem)
+ 从apiclient_cert.p12中导出密钥部分的文件,为pem格式
+ 部分开发语言和环境,不能直接使用p12文件,而需要使用pem,所以为了方便您使用,已为您直接提供
+ 您也可以使用openssl命令来自己导出:openssl pkcs12 -nocerts -in apiclient_cert.p12 -out apiclient_key.pem
+备注说明:
+ 由于绝大部分操作系统已内置了微信支付服务器证书的根CA证书, 2018年3月6日后, 不再提供CA证书文件(rootca.pem)下载
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 2d33287..ef8b951 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,6 +59,9 @@
2.17.0
1.2.9
+
+ 0.2.15
+ 0.5.0
@@ -326,6 +329,19 @@
+
+
+ com.github.wechatpay-apiv3
+ wechatpay-java
+ ${wechatpay-java.version}
+
+
+
+ com.github.wechatpay-apiv3
+ wechatpay-apache-httpclient
+ ${wechatpay-apache-httpclientd.version}
+
+