Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
gogirl-miniapp-backend
Commits
8b7eda01
Commit
8b7eda01
authored
Feb 21, 2023
by
wilse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、微信支付版本升级;
2、修复退款失败的问题。
parent
0efe06bf
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
10 deletions
+19
-10
pom.xml
pom.xml
+9
-3
MallRefundOrderServiceImpl.java
...plication/order/mall/impl/MallRefundOrderServiceImpl.java
+2
-2
WxPayConfig.java
...girl/infrastructure/common/config/config/WxPayConfig.java
+5
-2
WxPayController.java
...ogirl/infrastructure/service/wx/impl/WxPayController.java
+2
-2
ApplyTakeLeaveCommand.java
...n/java/com/gogirl/shared/store/ApplyTakeLeaveCommand.java
+1
-1
apiclient_cert.p12
src/main/resources/cert/apiclient_cert.p12
+0
-0
No files found.
pom.xml
View file @
8b7eda01
...
...
@@ -21,8 +21,8 @@
<!--jdk-->
<java.version>
1.8
</java.version>
<!--wx-->
<weixin-java-miniapp.version>
3.3
.0
</weixin-java-miniapp.version>
<weixin-java-pay.version>
3.3
.0
</weixin-java-pay.version>
<weixin-java-miniapp.version>
4.1
.0
</weixin-java-miniapp.version>
<weixin-java-pay.version>
4.1
.0
</weixin-java-pay.version>
<bcprov-jdk16.version>
1.46
</bcprov-jdk16.version>
<!--mybatis-->
<mybatis-plus-generator.version>
3.0.7
</mybatis-plus-generator.version>
...
...
@@ -38,7 +38,7 @@
<geodesy.version>
1.1.3
</geodesy.version>
<commons-dbcp.version>
1.4
</commons-dbcp.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-io.version>
2.4
</commons-io.version>
<!--json-->
...
...
@@ -433,6 +433,12 @@
<resource>
<directory>
src/main/resources
</directory>
<includes>
<include>
*.yml
</include>
<include>
*.xml
</include>
<include>
**/*.xml
</include>
<include>
**/*.p12
</include>
</includes>
</resource>
</resources>
</build>
...
...
src/main/java/com/gogirl/application/order/mall/impl/MallRefundOrderServiceImpl.java
View file @
8b7eda01
...
...
@@ -197,9 +197,9 @@ public class MallRefundOrderServiceImpl extends ServiceImpl<MallRefundOrderMappe
WxPayRefundRequest
refundRequest
=
WxPayRefundRequest
.
newBuilder
()
.
notifyUrl
(
gogirlProperties
.
getNotifyRefundMallOrder
())
.
outTradeNo
(
String
.
valueOf
(
mall
Refund
Order
.
getId
()))
.
outTradeNo
(
String
.
valueOf
(
mallOrder
.
getId
()))
.
outRefundNo
(
String
.
valueOf
(
mallRefundOrder
.
getId
()))
.
totalFee
(
mall
RefundOrder
.
getRefund
TotalAmount
().
intValue
()
*
100
)
.
totalFee
(
mall
Order
.
get
TotalAmount
().
intValue
()
*
100
)
.
refundFee
(
mallRefundOrder
.
getRefundTotalAmount
().
intValue
()
*
100
)
.
build
();
...
...
src/main/java/com/gogirl/infrastructure/common/config/config/WxPayConfig.java
View file @
8b7eda01
...
...
@@ -6,15 +6,18 @@ import com.gogirl.application.common.xcx.IMiniappBrandConfigService;
import
com.gogirl.domain.common.xcx.MiniappBrandConfig
;
import
com.gogirl.infrastructure.common.exception.RRException
;
import
lombok.Data
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.util.ResourceUtils
;
import
javax.annotation.PostConstruct
;
import
javax.annotation.Resource
;
import
javax.validation.constraints.AssertTrue
;
import
java.io.File
;
import
java.util.*
;
/**
...
...
@@ -42,6 +45,7 @@ public class WxPayConfig {
}
}
@SneakyThrows
public
static
WxPayService
wxPayService
(
Integer
brandId
){
if
(
MapUtils
.
isNotEmpty
(
brandMap
)
&&
brandMap
.
containsKey
(
brandId
))
{
MiniappBrandConfig
config
=
brandMap
.
get
(
brandId
);
...
...
@@ -51,8 +55,7 @@ public class WxPayConfig {
payConfig
.
setMchKey
(
StringUtils
.
trimToNull
(
config
.
getMchKey
()));
//payConfig.setSubAppId(StringUtils.trimToNull(this.properties.getSubAppId()));
//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
);
...
...
src/main/java/com/gogirl/infrastructure/service/wx/impl/WxPayController.java
View file @
8b7eda01
...
...
@@ -226,7 +226,7 @@ public class WxPayController implements WxPayService {
@PostMapping
(
"/sendRedpack"
)
public
WxPaySendRedpackResult
sendRedpack
(
@RequestBody
WxPaySendRedpackRequest
request
,
@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 {
@GetMapping
(
"/queryRedpack/{mchBillNo}"
)
public
WxPayRedpackQueryResult
queryRedpack
(
@PathVariable
String
mchBillNo
,
@RequestHeader
(
"brandId"
)
Integer
brandId
)
throws
WxPayException
{
return
WxPayConfig
.
wxPayService
(
brandId
).
queryRedpack
(
mchBillNo
);
return
WxPayConfig
.
wxPayService
(
brandId
).
getRedpackService
().
queryRedpack
(
mchBillNo
);
}
/**
...
...
src/main/java/com/gogirl/shared/store/ApplyTakeLeaveCommand.java
View file @
8b7eda01
...
...
@@ -19,7 +19,7 @@ public class ApplyTakeLeaveCommand implements Serializable {
@ApiModelProperty
(
"请假美甲师id"
)
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
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
...
...
src/main/resources/cert/apiclient_cert.p12
0 → 100644
View file @
8b7eda01
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment