Merge remote-tracking branch 'origin/bugfix/wechatcallback'
# Conflicts: # src/main/resources/weChatConfig.properties
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,19 +1,17 @@
|
|||||||
package com.peanut.modules.book.entity;
|
package com.peanut.modules.book.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品表
|
* 商品表
|
||||||
*
|
*
|
||||||
* @author yl
|
* @author yl
|
||||||
* @email yl328572838@163.com
|
* @email yl328572838@163.com
|
||||||
* @date 2022-11-30 10:30:56
|
* @date 2022-11-30 10:30:56
|
||||||
@@ -21,154 +19,148 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
@TableName("shop_product")
|
@TableName("shop_product")
|
||||||
public class ShopProductEntity implements Serializable {
|
public class ShopProductEntity implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@TableId
|
@TableId
|
||||||
private Integer productId;
|
private Integer productId;
|
||||||
/**
|
/**
|
||||||
* 商品名称
|
* 商品名称
|
||||||
*/
|
*/
|
||||||
private String productName;
|
private String productName;
|
||||||
/**
|
/**
|
||||||
* 商品价格
|
* 商品价格
|
||||||
*/
|
*/
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
/**
|
/**
|
||||||
* 商品活动价格
|
* 商品活动价格
|
||||||
*/
|
*/
|
||||||
private BigDecimal activityPrice;
|
private BigDecimal activityPrice;
|
||||||
/**
|
/**
|
||||||
* 商品重量
|
* 商品重量
|
||||||
*/
|
*/
|
||||||
private Float weight;
|
private Float weight;
|
||||||
/**
|
/**
|
||||||
* 上架状态
|
* 上架状态
|
||||||
*/
|
*/
|
||||||
private Integer publishStatus;
|
private Integer publishStatus;
|
||||||
/**
|
/**
|
||||||
* 商品介绍
|
* 商品介绍
|
||||||
*/
|
*/
|
||||||
private String productDetails;
|
private String productDetails;
|
||||||
/**
|
/**
|
||||||
* 商品分类id
|
* 商品分类id
|
||||||
*/
|
*/
|
||||||
private Integer productPid;
|
private Integer productPid;
|
||||||
/**
|
/**
|
||||||
* 商品 类型 0 - 预售 1 - 在售
|
* 商品 类型 0 - 预售 1 - 在售
|
||||||
*/
|
*/
|
||||||
private String productType;
|
private String productType;
|
||||||
/**
|
/**
|
||||||
* 商品库存
|
* 商品库存
|
||||||
*/
|
*/
|
||||||
private Integer productStock;
|
private Integer productStock;
|
||||||
/**
|
/**
|
||||||
* 商品图首页
|
* 商品图首页
|
||||||
*/
|
*/
|
||||||
private String productImages;
|
private String productImages;
|
||||||
/**
|
/**
|
||||||
* 商品 多图
|
* 商品 多图
|
||||||
*/
|
*/
|
||||||
private String productImageList;
|
private String productImageList;
|
||||||
/**
|
/**
|
||||||
* 商品销量
|
* 商品销量
|
||||||
*/
|
*/
|
||||||
private String productSalesVolume;
|
private String productSalesVolume;
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*/
|
*/
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
/**
|
/**
|
||||||
* 删除标记
|
* 删除标记
|
||||||
*/
|
*/
|
||||||
@TableLogic
|
@TableLogic
|
||||||
private Integer delFlag;
|
private Integer delFlag;
|
||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
*/
|
*/
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<Integer> poids;
|
private List<Integer> poids;
|
||||||
/**
|
/**
|
||||||
* 作者
|
* 作者
|
||||||
*/
|
*/
|
||||||
private String author;
|
private String author;
|
||||||
/**
|
/**
|
||||||
* 出版方
|
* 出版方
|
||||||
*/
|
*/
|
||||||
private String publisher;
|
private String publisher;
|
||||||
/**
|
/**
|
||||||
* 出版时间
|
* 出版时间
|
||||||
*/
|
*/
|
||||||
@TableField(value = "pub_date" , updateStrategy = FieldStrategy.IGNORED)
|
@TableField(value = "pub_date", updateStrategy = FieldStrategy.IGNORED)
|
||||||
private String pubDate;
|
private String pubDate;
|
||||||
/**
|
/**
|
||||||
* 开本
|
* 开本
|
||||||
*/
|
*/
|
||||||
private String format;
|
private String format;
|
||||||
/**
|
/**
|
||||||
* 页数
|
* 页数
|
||||||
*/
|
*/
|
||||||
@TableField(value = "page_num" , updateStrategy = FieldStrategy.IGNORED)
|
@TableField(value = "page_num", updateStrategy = FieldStrategy.IGNORED)
|
||||||
private Integer pageNum;
|
private Integer pageNum;
|
||||||
/**
|
/**
|
||||||
* 内文用纸材质
|
* 内文用纸材质
|
||||||
*/
|
*/
|
||||||
private String quality;
|
private String quality;
|
||||||
/**
|
/**
|
||||||
* 总销量
|
* 总销量
|
||||||
*/
|
*/
|
||||||
private Integer sumSales;
|
private Integer sumSales;
|
||||||
/**
|
/**
|
||||||
* 商品类型 1: 画册 2:书 3:仪器,4:预售书
|
* 商品类型 1: 画册 2:书 3:仪器,4:预售书
|
||||||
*/
|
*/
|
||||||
private String goodsType;
|
private String goodsType;
|
||||||
private String goodsTypeCode;
|
private String goodsTypeCode;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否包邮 0:包邮 ,1:不包邮
|
* 是否包邮 0:包邮 ,1:不包邮
|
||||||
*/
|
*/
|
||||||
private Object isFreeMail;
|
private Object isFreeMail;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 绑定电子书id,
|
* 绑定电子书id,
|
||||||
*/
|
*/
|
||||||
@TableField("book_ids")
|
@TableField("book_ids")
|
||||||
private String bookId;
|
private String bookId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多个电子书Id
|
* 多个电子书Id
|
||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private ArrayList<String> bookids;
|
private ArrayList<String> bookids;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多个电子书Id ArrayList<Map<String,String>>
|
* 多个电子书Id ArrayList<Map<String,String>>
|
||||||
*/
|
*/
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<Object> bookidsimages;
|
private List<Object> bookidsimages;
|
||||||
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<Object> shoproudBook;
|
private List<Object> shoproudBook;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<Object> shoproudIds;
|
private List<Object> shoproudIds;
|
||||||
|
|
||||||
@TableField(exist = false)
|
|
||||||
private List<String> shoproudLabels;
|
|
||||||
|
|
||||||
|
|
||||||
// private Object bookidsimages;
|
|
||||||
//
|
|
||||||
//e
|
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private List<String> shoproudLabels;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ public class WechatPayConfig implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 支付通知回调地址
|
* 支付通知回调地址
|
||||||
*/
|
*/
|
||||||
|
|
||||||
private String notifyUrl;
|
private String notifyUrl;
|
||||||
/**
|
/**
|
||||||
* 退款回调地址
|
* 退款回调地址
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ public class WeChatPayController {
|
|||||||
// 订单编号
|
// 订单编号
|
||||||
paramMap.put("out_trade_no", order.getOrderSn());
|
paramMap.put("out_trade_no", order.getOrderSn());
|
||||||
// paramMap.put("attach",""); //自定义数据 支付完成后才能显示 在查询API和支付通知中原样返回,可作为自定义参数使用
|
// paramMap.put("attach",""); //自定义数据 支付完成后才能显示 在查询API和支付通知中原样返回,可作为自定义参数使用
|
||||||
paramMap.put("notify_url", wechatPayConfig.getNotifyUrl());
|
//paramMap.put("notify_url", wechatPayConfig.getNotifyUrl());
|
||||||
|
paramMap.put("notify_url","https://testapi.nuttyreading.com/pay/payNotify");
|
||||||
|
|
||||||
// paramMap.put("time_expire",afterString);
|
// paramMap.put("time_expire",afterString);
|
||||||
// 实收金额0.38乘100=38
|
// 实收金额0.38乘100=38
|
||||||
@@ -283,6 +284,7 @@ public class WeChatPayController {
|
|||||||
System.out.println("============result========================" + b);
|
System.out.println("============result========================" + b);
|
||||||
if (wechatEntity.getTotalAmount().compareTo(realMoney) == 0) {
|
if (wechatEntity.getTotalAmount().compareTo(realMoney) == 0) {
|
||||||
buyOrderService.updateOrderStatus(order.getUserId(), order.getOrderSn(), "0");
|
buyOrderService.updateOrderStatus(order.getUserId(), order.getOrderSn(), "0");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ("point".equals(order.getOrderType())) {
|
if ("point".equals(order.getOrderType())) {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.peanut.modules.pay.weChatPay.util;
|
package com.peanut.modules.pay.weChatPay.util;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.wechat.pay.contrib.apache.httpclient.WechatPayHttpClientBuilder;
|
import com.wechat.pay.contrib.apache.httpclient.WechatPayHttpClientBuilder;
|
||||||
import com.wechat.pay.contrib.apache.httpclient.util.PemUtil;
|
import com.wechat.pay.contrib.apache.httpclient.util.PemUtil;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -32,12 +31,12 @@ import java.util.Base64;
|
|||||||
|
|
||||||
public static final String apiV3Key = "4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF"; // apiV3秘钥
|
public static final String apiV3Key = "4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF"; // apiV3秘钥
|
||||||
//商户私钥路径
|
//商户私钥路径
|
||||||
public static final String privateKeyUrl = "/usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem";
|
//public static final String privateKeyUrl = "/usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem";
|
||||||
//public static final String privateKeyUrl = "C:/Users/Cauchy/IdeaProjects/nuttyreading-java/src/main/resources/cent/apiclient_key.pem";
|
public static final String privateKeyUrl = "C:/Users/Cauchy/IdeaProjects/nuttyreading-java/src/main/resources/cent/apiclient_key.pem";
|
||||||
|
|
||||||
//平台证书路径
|
//平台证书路径
|
||||||
public static final String wechatPayCertificateUrl = "/usr/local/hs/peanut_book/target/classes/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem";
|
//public static final String wechatPayCertificateUrl = "/usr/local/hs/peanut_book/target/classes/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem";
|
||||||
//public static final String wechatPayCertificateUrl = "C:/Users/Cauchy/IdeaProjects/nuttyreading-java/src/main/resources/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem";
|
public static final String wechatPayCertificateUrl = "C:/Users/Cauchy/IdeaProjects/nuttyreading-java/src/main/resources/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem";
|
||||||
//第一步申请完证书后,在API证书哪里点击管理证书就能看到
|
//第一步申请完证书后,在API证书哪里点击管理证书就能看到
|
||||||
public static final String mchSerialNo = "679AECB2F7AC4183033F713828892BA640E4EEE3"; // 商户证书序列号
|
public static final String mchSerialNo = "679AECB2F7AC4183033F713828892BA640E4EEE3"; // 商户证书序列号
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
FROM shop_proudict_book spb
|
FROM shop_proudict_book spb
|
||||||
LEFT JOIN buy_order_detail bod ON spb.proudict_id = bod.product_id
|
LEFT JOIN buy_order_detail bod ON spb.proudict_id = bod.product_id
|
||||||
LEFT JOIN buy_order bo ON bo.order_id = bod.order_id
|
LEFT JOIN buy_order bo ON bo.order_id = bod.order_id
|
||||||
WHERE bo.order_sn = #{orderSn}
|
WHERE bo.order_sn = #{orderSn} AND del_flag != -1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,14 +10,13 @@ wxpay.baseUrl: https://api.mch.weixin.qq.com/v3
|
|||||||
#po9k1ezoyexk.ngrok.xiaomiqiu123.top # ????????
|
#po9k1ezoyexk.ngrok.xiaomiqiu123.top # ????????
|
||||||
#wxpay.notifyUrl: http://101.201.146.165:9100
|
#wxpay.notifyUrl: http://101.201.146.165:9100
|
||||||
|
|
||||||
wxpay.notifyUrl: http://59.110.212.44:9100/pb/pay/payNotify
|
wxpay.notifyUrl: http://59.110.212.44:9200/pb/pay/payNotify
|
||||||
|
|
||||||
# ??????
|
# ??????
|
||||||
wxpay.refundNotifyUrl: http://pjm6m9.natappfree.cc/pay/refundNotify
|
wxpay.refundNotifyUrl: http://pjm6m9.natappfree.cc/pay/refundNotify
|
||||||
# ???? /usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
# ???? /usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||||
|
|
||||||
#wxpay.keyPemPath:C:/Users/Cauchy/IdeaProjects/nuttyreading-java/src/main/resources/cent/apiclient_key.pem
|
#wxpay.keyPemPath:C:/Users/Cauchy/IdeaProjects/nuttyreading-java/src/main/resources/cent/apiclient_key.pem
|
||||||
#wxpay.keyPemPath:D:/hs/nuttyreading-java/target/classes/cent/apiclient_key.pem
|
|
||||||
wxpay.keyPemPath:/usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
wxpay.keyPemPath:/usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||||
#???????
|
#???????
|
||||||
wxpay.serialNo: 679AECB2F7AC4183033F713828892BA640E4EEE3
|
wxpay.serialNo: 679AECB2F7AC4183033F713828892BA640E4EEE3
|
||||||
|
|||||||
Reference in New Issue
Block a user