mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
Merge branch 'master-jdk17' of https://gitee.com/zhijiantianya/ruoyi-vue-pro into develop
This commit is contained in:
commit
a6670f3870
6
pom.xml
6
pom.xml
@ -15,12 +15,12 @@
|
|||||||
<!-- 各种 module 拓展 -->
|
<!-- 各种 module 拓展 -->
|
||||||
<module>yudao-module-system</module>
|
<module>yudao-module-system</module>
|
||||||
<module>yudao-module-infra</module>
|
<module>yudao-module-infra</module>
|
||||||
<module>yudao-module-member</module>
|
<!-- <module>yudao-module-member</module>-->
|
||||||
<!-- <module>yudao-module-bpm</module>-->
|
<!-- <module>yudao-module-bpm</module>-->
|
||||||
<!-- <module>yudao-module-report</module>-->
|
<!-- <module>yudao-module-report</module>-->
|
||||||
<!-- <module>yudao-module-mp</module>-->
|
<!-- <module>yudao-module-mp</module>-->
|
||||||
<module>yudao-module-pay</module>
|
<!-- <module>yudao-module-pay</module>-->
|
||||||
<module>yudao-module-mall</module>
|
<!-- <module>yudao-module-mall</module>-->
|
||||||
<!-- <module>yudao-module-crm</module>-->
|
<!-- <module>yudao-module-crm</module>-->
|
||||||
<!-- <module>yudao-module-erp</module>-->
|
<!-- <module>yudao-module-erp</module>-->
|
||||||
<!-- <module>yudao-module-ai</module>-->
|
<!-- <module>yudao-module-ai</module>-->
|
||||||
|
@ -113,7 +113,7 @@ public class PayRefundServiceImpl implements PayRefundService {
|
|||||||
// 2.1 插入退款单
|
// 2.1 插入退款单
|
||||||
String no = noRedisDAO.generate(payProperties.getRefundNoPrefix());
|
String no = noRedisDAO.generate(payProperties.getRefundNoPrefix());
|
||||||
refund = PayRefundConvert.INSTANCE.convert(reqDTO)
|
refund = PayRefundConvert.INSTANCE.convert(reqDTO)
|
||||||
.setNo(no).setOrderId(order.getId()).setOrderNo(order.getNo())
|
.setNo(no).setAppId(app.getId()).setOrderId(order.getId()).setOrderNo(order.getNo())
|
||||||
.setChannelId(order.getChannelId()).setChannelCode(order.getChannelCode())
|
.setChannelId(order.getChannelId()).setChannelCode(order.getChannelCode())
|
||||||
// 商户相关的字段
|
// 商户相关的字段
|
||||||
.setNotifyUrl(app.getRefundNotifyUrl())
|
.setNotifyUrl(app.getRefundNotifyUrl())
|
||||||
|
@ -243,6 +243,9 @@ public class PayOrderServiceTest extends BaseDbAndRedisUnitTest {
|
|||||||
// mock 数据
|
// mock 数据
|
||||||
PayOrderDO dbOrder = randomPojo(PayOrderDO.class, o -> o.setAppId(1L).setMerchantOrderId("10"));
|
PayOrderDO dbOrder = randomPojo(PayOrderDO.class, o -> o.setAppId(1L).setMerchantOrderId("10"));
|
||||||
orderMapper.insert(dbOrder);
|
orderMapper.insert(dbOrder);
|
||||||
|
// mock 方法
|
||||||
|
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L).setOrderNotifyUrl("http://127.0.0.1"));
|
||||||
|
when(appService.validPayApp(eq(reqDTO.getAppKey()))).thenReturn(app);
|
||||||
|
|
||||||
// 调用
|
// 调用
|
||||||
Long orderId = orderService.createOrder(reqDTO);
|
Long orderId = orderService.createOrder(reqDTO);
|
||||||
|
@ -212,7 +212,7 @@ public class PayRefundServiceTest extends BaseDbAndRedisUnitTest {
|
|||||||
o -> o.setAppKey("demo"));
|
o -> o.setAppKey("demo"));
|
||||||
// mock 方法(app)
|
// mock 方法(app)
|
||||||
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
||||||
when(appService.validPayApp(eq(1L))).thenReturn(app);
|
when(appService.validPayApp(eq("demo"))).thenReturn(app);
|
||||||
|
|
||||||
// 调用,并断言异常
|
// 调用,并断言异常
|
||||||
assertServiceException(() -> refundService.createPayRefund(reqDTO),
|
assertServiceException(() -> refundService.createPayRefund(reqDTO),
|
||||||
@ -235,7 +235,7 @@ public class PayRefundServiceTest extends BaseDbAndRedisUnitTest {
|
|||||||
o -> o.setAppKey("demo").setMerchantOrderId("100"));
|
o -> o.setAppKey("demo").setMerchantOrderId("100"));
|
||||||
// mock 方法(app)
|
// mock 方法(app)
|
||||||
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
||||||
when(appService.validPayApp(eq(1L))).thenReturn(app);
|
when(appService.validPayApp(eq("demo"))).thenReturn(app);
|
||||||
// mock 数据(order)
|
// mock 数据(order)
|
||||||
PayOrderDO order = randomPojo(PayOrderDO.class, o -> o.setStatus(status));
|
PayOrderDO order = randomPojo(PayOrderDO.class, o -> o.setStatus(status));
|
||||||
when(orderService.getOrder(eq(1L), eq("100"))).thenReturn(order);
|
when(orderService.getOrder(eq(1L), eq("100"))).thenReturn(order);
|
||||||
@ -252,7 +252,7 @@ public class PayRefundServiceTest extends BaseDbAndRedisUnitTest {
|
|||||||
o -> o.setAppKey("demo").setMerchantOrderId("100").setPrice(10));
|
o -> o.setAppKey("demo").setMerchantOrderId("100").setPrice(10));
|
||||||
// mock 方法(app)
|
// mock 方法(app)
|
||||||
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
||||||
when(appService.validPayApp(eq(1L))).thenReturn(app);
|
when(appService.validPayApp(eq("demo"))).thenReturn(app);
|
||||||
// mock 数据(order)
|
// mock 数据(order)
|
||||||
PayOrderDO order = randomPojo(PayOrderDO.class, o ->
|
PayOrderDO order = randomPojo(PayOrderDO.class, o ->
|
||||||
o.setStatus(PayOrderStatusEnum.REFUND.getStatus())
|
o.setStatus(PayOrderStatusEnum.REFUND.getStatus())
|
||||||
@ -271,7 +271,7 @@ public class PayRefundServiceTest extends BaseDbAndRedisUnitTest {
|
|||||||
o -> o.setAppKey("demo").setMerchantOrderId("100").setPrice(10));
|
o -> o.setAppKey("demo").setMerchantOrderId("100").setPrice(10));
|
||||||
// mock 方法(app)
|
// mock 方法(app)
|
||||||
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
||||||
when(appService.validPayApp(eq(1L))).thenReturn(app);
|
when(appService.validPayApp(eq("demo"))).thenReturn(app);
|
||||||
// mock 数据(order)
|
// mock 数据(order)
|
||||||
PayOrderDO order = randomPojo(PayOrderDO.class, o ->
|
PayOrderDO order = randomPojo(PayOrderDO.class, o ->
|
||||||
o.setStatus(PayOrderStatusEnum.REFUND.getStatus())
|
o.setStatus(PayOrderStatusEnum.REFUND.getStatus())
|
||||||
@ -294,7 +294,7 @@ public class PayRefundServiceTest extends BaseDbAndRedisUnitTest {
|
|||||||
o -> o.setAppKey("demo").setMerchantOrderId("100").setPrice(9));
|
o -> o.setAppKey("demo").setMerchantOrderId("100").setPrice(9));
|
||||||
// mock 方法(app)
|
// mock 方法(app)
|
||||||
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
||||||
when(appService.validPayApp(eq(1L))).thenReturn(app);
|
when(appService.validPayApp(eq("demo"))).thenReturn(app);
|
||||||
// mock 数据(order)
|
// mock 数据(order)
|
||||||
PayOrderDO order = randomPojo(PayOrderDO.class, o ->
|
PayOrderDO order = randomPojo(PayOrderDO.class, o ->
|
||||||
o.setStatus(PayOrderStatusEnum.REFUND.getStatus())
|
o.setStatus(PayOrderStatusEnum.REFUND.getStatus())
|
||||||
@ -319,7 +319,7 @@ public class PayRefundServiceTest extends BaseDbAndRedisUnitTest {
|
|||||||
.setMerchantRefundId("200").setReason("测试退款"));
|
.setMerchantRefundId("200").setReason("测试退款"));
|
||||||
// mock 方法(app)
|
// mock 方法(app)
|
||||||
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
||||||
when(appService.validPayApp(eq(1L))).thenReturn(app);
|
when(appService.validPayApp(eq("demo"))).thenReturn(app);
|
||||||
// mock 数据(order)
|
// mock 数据(order)
|
||||||
PayOrderDO order = randomPojo(PayOrderDO.class, o ->
|
PayOrderDO order = randomPojo(PayOrderDO.class, o ->
|
||||||
o.setStatus(PayOrderStatusEnum.REFUND.getStatus())
|
o.setStatus(PayOrderStatusEnum.REFUND.getStatus())
|
||||||
@ -351,7 +351,7 @@ public class PayRefundServiceTest extends BaseDbAndRedisUnitTest {
|
|||||||
.setMerchantRefundId("200").setReason("测试退款"));
|
.setMerchantRefundId("200").setReason("测试退款"));
|
||||||
// mock 方法(app)
|
// mock 方法(app)
|
||||||
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
||||||
when(appService.validPayApp(eq(1L))).thenReturn(app);
|
when(appService.validPayApp(eq("demo"))).thenReturn(app);
|
||||||
// mock 数据(order)
|
// mock 数据(order)
|
||||||
PayOrderDO order = randomPojo(PayOrderDO.class, o ->
|
PayOrderDO order = randomPojo(PayOrderDO.class, o ->
|
||||||
o.setStatus(PayOrderStatusEnum.REFUND.getStatus())
|
o.setStatus(PayOrderStatusEnum.REFUND.getStatus())
|
||||||
@ -395,7 +395,7 @@ public class PayRefundServiceTest extends BaseDbAndRedisUnitTest {
|
|||||||
.setMerchantRefundId("200").setReason("测试退款"));
|
.setMerchantRefundId("200").setReason("测试退款"));
|
||||||
// mock 方法(app)
|
// mock 方法(app)
|
||||||
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
PayAppDO app = randomPojo(PayAppDO.class, o -> o.setId(1L));
|
||||||
when(appService.validPayApp(eq(1L))).thenReturn(app);
|
when(appService.validPayApp(eq("demo"))).thenReturn(app);
|
||||||
// mock 数据(order)
|
// mock 数据(order)
|
||||||
PayOrderDO order = randomPojo(PayOrderDO.class, o ->
|
PayOrderDO order = randomPojo(PayOrderDO.class, o ->
|
||||||
o.setStatus(PayOrderStatusEnum.REFUND.getStatus())
|
o.setStatus(PayOrderStatusEnum.REFUND.getStatus())
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
CREATE TABLE IF NOT EXISTS "pay_app" (
|
CREATE TABLE IF NOT EXISTS "pay_app" (
|
||||||
"id" number NOT NULL GENERATED BY DEFAULT AS IDENTITY,
|
"id" number NOT NULL GENERATED BY DEFAULT AS IDENTITY,
|
||||||
|
"app_key" varchar(64) NOT NULL,
|
||||||
"name" varchar(64) NOT NULL,
|
"name" varchar(64) NOT NULL,
|
||||||
"status" tinyint NOT NULL,
|
"status" tinyint NOT NULL,
|
||||||
"remark" varchar(255) DEFAULT NULL,
|
"remark" varchar(255) DEFAULT NULL,
|
||||||
|
@ -33,11 +33,11 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 会员中心。默认注释,保证编译速度 -->
|
<!-- 会员中心。默认注释,保证编译速度 -->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
<!-- <groupId>cn.iocoder.boot</groupId>-->
|
||||||
<artifactId>yudao-module-member-biz</artifactId>
|
<!-- <artifactId>yudao-module-member-biz</artifactId>-->
|
||||||
<version>${revision}</version>
|
<!-- <version>${revision}</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- 数据报表。默认注释,保证编译速度 -->
|
<!-- 数据报表。默认注释,保证编译速度 -->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
@ -52,11 +52,11 @@
|
|||||||
<!-- <version>${revision}</version>-->
|
<!-- <version>${revision}</version>-->
|
||||||
<!-- </dependency>-->
|
<!-- </dependency>-->
|
||||||
<!-- 支付服务。默认注释,保证编译速度 -->
|
<!-- 支付服务。默认注释,保证编译速度 -->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
<!-- <groupId>cn.iocoder.boot</groupId>-->
|
||||||
<artifactId>yudao-module-pay-biz</artifactId>
|
<!-- <artifactId>yudao-module-pay-biz</artifactId>-->
|
||||||
<version>${revision}</version>
|
<!-- <version>${revision}</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- 微信公众号模块。默认注释,保证编译速度 -->
|
<!-- 微信公众号模块。默认注释,保证编译速度 -->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
@ -66,26 +66,26 @@
|
|||||||
<!-- </dependency>-->
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- 商城相关模块。默认注释,保证编译速度-->
|
<!-- 商城相关模块。默认注释,保证编译速度-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
<!-- <groupId>cn.iocoder.boot</groupId>-->
|
||||||
<artifactId>yudao-module-promotion-biz</artifactId>
|
<!-- <artifactId>yudao-module-promotion-biz</artifactId>-->
|
||||||
<version>${revision}</version>
|
<!-- <version>${revision}</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
<!-- <groupId>cn.iocoder.boot</groupId>-->
|
||||||
<artifactId>yudao-module-product-biz</artifactId>
|
<!-- <artifactId>yudao-module-product-biz</artifactId>-->
|
||||||
<version>${revision}</version>
|
<!-- <version>${revision}</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
<!-- <groupId>cn.iocoder.boot</groupId>-->
|
||||||
<artifactId>yudao-module-trade-biz</artifactId>
|
<!-- <artifactId>yudao-module-trade-biz</artifactId>-->
|
||||||
<version>${revision}</version>
|
<!-- <version>${revision}</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>cn.iocoder.boot</groupId>
|
<!-- <groupId>cn.iocoder.boot</groupId>-->
|
||||||
<artifactId>yudao-module-statistics-biz</artifactId>
|
<!-- <artifactId>yudao-module-statistics-biz</artifactId>-->
|
||||||
<version>${revision}</version>
|
<!-- <version>${revision}</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<!-- CRM 相关模块。默认注释,保证编译速度 -->
|
<!-- CRM 相关模块。默认注释,保证编译速度 -->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
|
Loading…
Reference in New Issue
Block a user