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,15 +1,13 @@
|
||||
package com.peanut.modules.book.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 商品表
|
||||
@@ -21,154 +19,148 @@ import lombok.Data;
|
||||
@Data
|
||||
@TableName("shop_product")
|
||||
public class ShopProductEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId
|
||||
private Integer productId;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 商品价格
|
||||
*/
|
||||
private BigDecimal price;
|
||||
/**
|
||||
* 商品活动价格
|
||||
*/
|
||||
private BigDecimal activityPrice;
|
||||
/**
|
||||
* 商品重量
|
||||
*/
|
||||
private Float weight;
|
||||
/**
|
||||
* 上架状态
|
||||
*/
|
||||
private Integer publishStatus;
|
||||
/**
|
||||
* 商品介绍
|
||||
*/
|
||||
private String productDetails;
|
||||
/**
|
||||
* 商品分类id
|
||||
*/
|
||||
private Integer productPid;
|
||||
/**
|
||||
* 商品 类型 0 - 预售 1 - 在售
|
||||
*/
|
||||
private String productType;
|
||||
/**
|
||||
* 商品库存
|
||||
*/
|
||||
private Integer productStock;
|
||||
/**
|
||||
* 商品图首页
|
||||
*/
|
||||
private String productImages;
|
||||
/**
|
||||
* 商品 多图
|
||||
*/
|
||||
private String productImageList;
|
||||
/**
|
||||
* 商品销量
|
||||
*/
|
||||
private String productSalesVolume;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 删除标记
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId
|
||||
private Integer productId;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
private String productName;
|
||||
/**
|
||||
* 商品价格
|
||||
*/
|
||||
private BigDecimal price;
|
||||
/**
|
||||
* 商品活动价格
|
||||
*/
|
||||
private BigDecimal activityPrice;
|
||||
/**
|
||||
* 商品重量
|
||||
*/
|
||||
private Float weight;
|
||||
/**
|
||||
* 上架状态
|
||||
*/
|
||||
private Integer publishStatus;
|
||||
/**
|
||||
* 商品介绍
|
||||
*/
|
||||
private String productDetails;
|
||||
/**
|
||||
* 商品分类id
|
||||
*/
|
||||
private Integer productPid;
|
||||
/**
|
||||
* 商品 类型 0 - 预售 1 - 在售
|
||||
*/
|
||||
private String productType;
|
||||
/**
|
||||
* 商品库存
|
||||
*/
|
||||
private Integer productStock;
|
||||
/**
|
||||
* 商品图首页
|
||||
*/
|
||||
private String productImages;
|
||||
/**
|
||||
* 商品 多图
|
||||
*/
|
||||
private String productImageList;
|
||||
/**
|
||||
* 商品销量
|
||||
*/
|
||||
private String productSalesVolume;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 删除标记
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer delFlag;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<Integer> poids;
|
||||
/**
|
||||
* 作者
|
||||
*/
|
||||
private String author;
|
||||
/**
|
||||
* 出版方
|
||||
*/
|
||||
private String publisher;
|
||||
/**
|
||||
* 出版时间
|
||||
*/
|
||||
@TableField(value = "pub_date" , updateStrategy = FieldStrategy.IGNORED)
|
||||
private String pubDate;
|
||||
/**
|
||||
* 开本
|
||||
*/
|
||||
private String format;
|
||||
/**
|
||||
* 页数
|
||||
*/
|
||||
@TableField(value = "page_num" , updateStrategy = FieldStrategy.IGNORED)
|
||||
private Integer pageNum;
|
||||
/**
|
||||
* 内文用纸材质
|
||||
*/
|
||||
private String quality;
|
||||
/**
|
||||
* 总销量
|
||||
*/
|
||||
private Integer sumSales;
|
||||
/**
|
||||
* 商品类型 1: 画册 2:书 3:仪器,4:预售书
|
||||
*/
|
||||
private String goodsType;
|
||||
private String goodsTypeCode;
|
||||
@TableField(exist = false)
|
||||
private List<Integer> poids;
|
||||
/**
|
||||
* 作者
|
||||
*/
|
||||
private String author;
|
||||
/**
|
||||
* 出版方
|
||||
*/
|
||||
private String publisher;
|
||||
/**
|
||||
* 出版时间
|
||||
*/
|
||||
@TableField(value = "pub_date", updateStrategy = FieldStrategy.IGNORED)
|
||||
private String pubDate;
|
||||
/**
|
||||
* 开本
|
||||
*/
|
||||
private String format;
|
||||
/**
|
||||
* 页数
|
||||
*/
|
||||
@TableField(value = "page_num", updateStrategy = FieldStrategy.IGNORED)
|
||||
private Integer pageNum;
|
||||
/**
|
||||
* 内文用纸材质
|
||||
*/
|
||||
private String quality;
|
||||
/**
|
||||
* 总销量
|
||||
*/
|
||||
private Integer sumSales;
|
||||
/**
|
||||
* 商品类型 1: 画册 2:书 3:仪器,4:预售书
|
||||
*/
|
||||
private String goodsType;
|
||||
private String goodsTypeCode;
|
||||
|
||||
|
||||
/**
|
||||
* 是否包邮 0:包邮 ,1:不包邮
|
||||
*/
|
||||
private Object isFreeMail;
|
||||
/**
|
||||
* 是否包邮 0:包邮 ,1:不包邮
|
||||
*/
|
||||
private Object isFreeMail;
|
||||
|
||||
/**
|
||||
* 绑定电子书id,
|
||||
*/
|
||||
@TableField("book_ids")
|
||||
private String bookId;
|
||||
/**
|
||||
* 绑定电子书id,
|
||||
*/
|
||||
@TableField("book_ids")
|
||||
private String bookId;
|
||||
|
||||
/**
|
||||
* 多个电子书Id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private ArrayList<String> bookids;
|
||||
/**
|
||||
* 多个电子书Id
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private ArrayList<String> bookids;
|
||||
|
||||
/**
|
||||
* 多个电子书Id ArrayList<Map<String,String>>
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<Object> bookidsimages;
|
||||
/**
|
||||
* 多个电子书Id ArrayList<Map<String,String>>
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<Object> bookidsimages;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<Object> shoproudBook;
|
||||
@TableField(exist = false)
|
||||
private List<Object> shoproudBook;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<Object> shoproudIds;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> shoproudLabels;
|
||||
|
||||
|
||||
// private Object bookidsimages;
|
||||
//
|
||||
//e
|
||||
@TableField(exist = false)
|
||||
private List<Object> shoproudIds;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> shoproudLabels;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,6 @@ public class WechatPayConfig implements Serializable {
|
||||
/**
|
||||
* 支付通知回调地址
|
||||
*/
|
||||
|
||||
private String notifyUrl;
|
||||
/**
|
||||
* 退款回调地址
|
||||
|
||||
@@ -109,7 +109,8 @@ public class WeChatPayController {
|
||||
// 订单编号
|
||||
paramMap.put("out_trade_no", order.getOrderSn());
|
||||
// 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);
|
||||
// 实收金额0.38乘100=38
|
||||
@@ -283,6 +284,7 @@ public class WeChatPayController {
|
||||
System.out.println("============result========================" + b);
|
||||
if (wechatEntity.getTotalAmount().compareTo(realMoney) == 0) {
|
||||
buyOrderService.updateOrderStatus(order.getUserId(), order.getOrderSn(), "0");
|
||||
|
||||
}
|
||||
}
|
||||
if ("point".equals(order.getOrderType())) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
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.util.PemUtil;
|
||||
import lombok.Data;
|
||||
@@ -32,12 +31,12 @@ import java.util.Base64;
|
||||
|
||||
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 = "C:/Users/Cauchy/IdeaProjects/nuttyreading-java/src/main/resources/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 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 = "/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";
|
||||
//第一步申请完证书后,在API证书哪里点击管理证书就能看到
|
||||
public static final String mchSerialNo = "679AECB2F7AC4183033F713828892BA640E4EEE3"; // 商户证书序列号
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
FROM shop_proudict_book spb
|
||||
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
|
||||
WHERE bo.order_sn = #{orderSn}
|
||||
WHERE bo.order_sn = #{orderSn} AND del_flag != -1
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@@ -10,14 +10,13 @@ wxpay.baseUrl: https://api.mch.weixin.qq.com/v3
|
||||
#po9k1ezoyexk.ngrok.xiaomiqiu123.top # ????????
|
||||
#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
|
||||
# ???? /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:D:/hs/nuttyreading-java/target/classes/cent/apiclient_key.pem
|
||||
wxpay.keyPemPath:/usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||
#???????
|
||||
wxpay.serialNo: 679AECB2F7AC4183033F713828892BA640E4EEE3
|
||||
|
||||
Reference in New Issue
Block a user