Commit 8b7eda01 by wilse

1、微信支付版本升级;

2、修复退款失败的问题。
parent 0efe06bf
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
<!--jdk--> <!--jdk-->
<java.version>1.8</java.version> <java.version>1.8</java.version>
<!--wx--> <!--wx-->
<weixin-java-miniapp.version>3.3.0</weixin-java-miniapp.version> <weixin-java-miniapp.version>4.1.0</weixin-java-miniapp.version>
<weixin-java-pay.version>3.3.0</weixin-java-pay.version> <weixin-java-pay.version>4.1.0</weixin-java-pay.version>
<bcprov-jdk16.version>1.46</bcprov-jdk16.version> <bcprov-jdk16.version>1.46</bcprov-jdk16.version>
<!--mybatis--> <!--mybatis-->
<mybatis-plus-generator.version>3.0.7</mybatis-plus-generator.version> <mybatis-plus-generator.version>3.0.7</mybatis-plus-generator.version>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<geodesy.version>1.1.3</geodesy.version> <geodesy.version>1.1.3</geodesy.version>
<commons-dbcp.version>1.4</commons-dbcp.version> <commons-dbcp.version>1.4</commons-dbcp.version>
<commons-pool2.version>2.5.0</commons-pool2.version> <commons-pool2.version>2.5.0</commons-pool2.version>
<commons-lang3.verson>3.7</commons-lang3.verson> <commons-lang3.verson>3.12.0</commons-lang3.verson>
<commons-fileupload.version>1.3.1</commons-fileupload.version> <commons-fileupload.version>1.3.1</commons-fileupload.version>
<commons-io.version>2.4</commons-io.version> <commons-io.version>2.4</commons-io.version>
<!--json--> <!--json-->
...@@ -433,6 +433,12 @@ ...@@ -433,6 +433,12 @@
<resource> <resource>
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
<includes>
<include>*.yml</include>
<include>*.xml</include>
<include>**/*.xml</include>
<include>**/*.p12</include>
</includes>
</resource> </resource>
</resources> </resources>
</build> </build>
......
...@@ -197,9 +197,9 @@ public class MallRefundOrderServiceImpl extends ServiceImpl<MallRefundOrderMappe ...@@ -197,9 +197,9 @@ public class MallRefundOrderServiceImpl extends ServiceImpl<MallRefundOrderMappe
WxPayRefundRequest refundRequest = WxPayRefundRequest.newBuilder() WxPayRefundRequest refundRequest = WxPayRefundRequest.newBuilder()
.notifyUrl(gogirlProperties.getNotifyRefundMallOrder()) .notifyUrl(gogirlProperties.getNotifyRefundMallOrder())
.outTradeNo(String.valueOf(mallRefundOrder.getId())) .outTradeNo(String.valueOf(mallOrder.getId()))
.outRefundNo(String.valueOf(mallRefundOrder.getId())) .outRefundNo(String.valueOf(mallRefundOrder.getId()))
.totalFee(mallRefundOrder.getRefundTotalAmount().intValue() * 100) .totalFee(mallOrder.getTotalAmount().intValue() * 100)
.refundFee(mallRefundOrder.getRefundTotalAmount().intValue() * 100) .refundFee(mallRefundOrder.getRefundTotalAmount().intValue() * 100)
.build(); .build();
......
...@@ -6,15 +6,18 @@ import com.gogirl.application.common.xcx.IMiniappBrandConfigService; ...@@ -6,15 +6,18 @@ import com.gogirl.application.common.xcx.IMiniappBrandConfigService;
import com.gogirl.domain.common.xcx.MiniappBrandConfig; import com.gogirl.domain.common.xcx.MiniappBrandConfig;
import com.gogirl.infrastructure.common.exception.RRException; import com.gogirl.infrastructure.common.exception.RRException;
import lombok.Data; import lombok.Data;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.util.ResourceUtils;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.validation.constraints.AssertTrue; import javax.validation.constraints.AssertTrue;
import java.io.File;
import java.util.*; import java.util.*;
/** /**
...@@ -42,6 +45,7 @@ public class WxPayConfig { ...@@ -42,6 +45,7 @@ public class WxPayConfig {
} }
} }
@SneakyThrows
public static WxPayService wxPayService(Integer brandId){ public static WxPayService wxPayService(Integer brandId){
if(MapUtils.isNotEmpty(brandMap) && brandMap.containsKey(brandId)) { if(MapUtils.isNotEmpty(brandMap) && brandMap.containsKey(brandId)) {
MiniappBrandConfig config = brandMap.get(brandId); MiniappBrandConfig config = brandMap.get(brandId);
...@@ -51,8 +55,7 @@ public class WxPayConfig { ...@@ -51,8 +55,7 @@ public class WxPayConfig {
payConfig.setMchKey(StringUtils.trimToNull(config.getMchKey())); payConfig.setMchKey(StringUtils.trimToNull(config.getMchKey()));
//payConfig.setSubAppId(StringUtils.trimToNull(this.properties.getSubAppId())); //payConfig.setSubAppId(StringUtils.trimToNull(this.properties.getSubAppId()));
//payConfig.setSubMchId(StringUtils.trimToNull(this.properties.getSubMchId())); //payConfig.setSubMchId(StringUtils.trimToNull(this.properties.getSubMchId()));
//payConfig.setKeyPath(StringUtils.trimToNull(this.properties.getKeyPath())); payConfig.setKeyPath(StringUtils.join(ResourceUtils.CLASSPATH_URL_PREFIX,"cert/apiclient_cert.p12"));
// 可以指定是否使用沙箱环境 // 可以指定是否使用沙箱环境
payConfig.setUseSandboxEnv(false); payConfig.setUseSandboxEnv(false);
......
...@@ -226,7 +226,7 @@ public class WxPayController implements WxPayService { ...@@ -226,7 +226,7 @@ public class WxPayController implements WxPayService {
@PostMapping("/sendRedpack") @PostMapping("/sendRedpack")
public WxPaySendRedpackResult sendRedpack(@RequestBody WxPaySendRedpackRequest request, public WxPaySendRedpackResult sendRedpack(@RequestBody WxPaySendRedpackRequest request,
@RequestHeader("brandId") Integer brandId) throws WxPayException { @RequestHeader("brandId") Integer brandId) throws WxPayException {
return WxPayConfig.wxPayService(brandId).sendRedpack(request); return WxPayConfig.wxPayService(brandId).getRedpackService().sendRedpack(request);
} }
/** /**
...@@ -244,7 +244,7 @@ public class WxPayController implements WxPayService { ...@@ -244,7 +244,7 @@ public class WxPayController implements WxPayService {
@GetMapping("/queryRedpack/{mchBillNo}") @GetMapping("/queryRedpack/{mchBillNo}")
public WxPayRedpackQueryResult queryRedpack(@PathVariable String mchBillNo, public WxPayRedpackQueryResult queryRedpack(@PathVariable String mchBillNo,
@RequestHeader("brandId") Integer brandId) throws WxPayException { @RequestHeader("brandId") Integer brandId) throws WxPayException {
return WxPayConfig.wxPayService(brandId).queryRedpack(mchBillNo); return WxPayConfig.wxPayService(brandId).getRedpackService().queryRedpack(mchBillNo);
} }
/** /**
......
...@@ -19,7 +19,7 @@ public class ApplyTakeLeaveCommand implements Serializable { ...@@ -19,7 +19,7 @@ public class ApplyTakeLeaveCommand implements Serializable {
@ApiModelProperty("请假美甲师id") @ApiModelProperty("请假美甲师id")
private Integer applyTechnicianId; private Integer applyTechnicianId;
@ApiModelProperty("1-加班 2-调休 3-事假 4-病假 5-外出 6-年假 7-生日假 8-婚假") @ApiModelProperty("1-加班 2-调休 3-事假 4-病假 5-外出 6-年假 7-生日假 8-婚假 9-产假")
private Integer type; private Integer type;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment