From 04b930504d47e9fed1e1c3b0c07f76f0a5edd567 Mon Sep 17 00:00:00 2001 From: DB <2502523450@qq.com> Date: Fri, 19 Jan 2024 09:08:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=88=E5=AD=A6=E5=90=8E=E4=BB=98=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backstage/CardTemplateController.java | 24 +++++-- .../mini/MiniEasyLearnController.java | 68 ++++++++++++++++++ .../business/service/CardTemplateService.java | 24 +++++-- .../service/impl/CardTemplateServiceImpl.java | 71 ++++++++++++++++--- .../vo/LearnNowPayLaterPlanDetailVo.java | 49 +++++++++++++ .../business/vo/LearnNowPayLaterPlanVo.java | 64 +++++++++++++++++ .../framework/tasks/LearnNowPayLaterTask.java | 4 +- .../com/cpop/mall/web/CpopWxPayTests.java | 15 ++-- .../com/cpop/oam/web/CpopEasyLearnTest.java | 17 ++++- 9 files changed, 308 insertions(+), 28 deletions(-) create mode 100644 Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/mini/MiniEasyLearnController.java create mode 100644 Cpop-Jambox/src/main/java/com/cpop/jambox/business/vo/LearnNowPayLaterPlanDetailVo.java create mode 100644 Cpop-Jambox/src/main/java/com/cpop/jambox/business/vo/LearnNowPayLaterPlanVo.java diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/CardTemplateController.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/CardTemplateController.java index ce6661b..fb9c8fb 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/CardTemplateController.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/backstage/CardTemplateController.java @@ -1,14 +1,16 @@ package com.cpop.jambox.business.controller.backstage; -import com.cpop.core.annontation.SimpleSignatureCheck; -import com.cpop.jambox.business.bo.CardTemplateUnionBo; import com.cpop.core.base.R; +import com.cpop.jambox.business.bo.CardTemplateUnionBo; import com.cpop.jambox.business.service.CardTemplateService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** * 果酱-课卡模板 控制层。 @@ -33,8 +35,22 @@ public class CardTemplateController { //@SimpleSignatureCheck @ApiOperation(value = "添加课卡模板(整合)") @PostMapping("/insertCardTemplateUnion") - public R insertCardTemplateUnion(@RequestBody @Validated CardTemplateUnionBo bo) { + public R insertCardTemplateUnion(@RequestBody @Validated CardTemplateUnionBo bo) { cardTemplateService.insertCardTemplateUnion(bo); return R.ok(); } + + /** + * 修改课卡模板(整合) + * @author DB + * @since 2023/10/07 9:59 + * @param bo 请求参数 + */ + //@SimpleSignatureCheck + @ApiOperation(value = "修改课卡模板(整合)") + @PostMapping("/updateCardTemplateUnion") + public R updateCardTemplateUnion(@RequestBody @Validated CardTemplateUnionBo bo) { + cardTemplateService.updateCardTemplateUnion(bo); + return R.ok(); + } } diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/mini/MiniEasyLearnController.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/mini/MiniEasyLearnController.java new file mode 100644 index 0000000..8f3d9b1 --- /dev/null +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/controller/mini/MiniEasyLearnController.java @@ -0,0 +1,68 @@ +package com.cpop.jambox.business.controller.mini; + +import com.cpop.core.base.R; +import com.cpop.jambox.business.service.CardTemplateService; +import com.cpop.jambox.business.service.EasyLearnOrderService; +import com.cpop.jambox.business.vo.LearnNowPayLaterPlanDetailVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @author DB + * @version 1.0.0 + * @since 2024-01-18 22:58 + */ +@RestController +@Api(tags = "果酱小程序-放心学接口") +@RequestMapping("/mini/easyLearn") +public class MiniEasyLearnController { + + @Autowired + private CardTemplateService cardTemplateService; + + @Autowired + private EasyLearnOrderService easyLearnOrderService; + + /** + * 获取支付分计划 + * @author DB + * @since 2024/1/18 + * @param oldTemplateId 旧模板id + * @param isMonth 是否月付 + * @return R + */ + @ApiOperation("获取支付分计划") + @GetMapping("/getWxPayScorePlan") + public R getWxPayScorePlan(@ApiParam(value = "旧模板id",required = true) @RequestParam("oldTemplateId") String oldTemplateId, + @ApiParam(value = "是否月付(0否1是)",required = true) @RequestParam("isMonth") Boolean isMonth) { + LearnNowPayLaterPlanDetailVo vo = cardTemplateService.getWxPayScorePlan(oldTemplateId,isMonth); + return R.ok(vo); + } + + /** + * 获取支付分计划 + * @author DB + * @since 2024/1/18 + * @param oldTemplateId 旧模板id + * @param isMonth 是否月付 + * @return R + */ + @ApiOperation("创建用户签约计划") + @PostMapping("/createUserSignPlans") + public R createUserSignPlans(@ApiParam(value = "旧模板id",required = true) @RequestParam("oldTemplateId") String oldTemplateId, + @ApiParam(value = "是否月付(0否1是)",required = true) @RequestParam("isMonth") Boolean isMonth) { + return R.ok(); + } + + /** + * 创建用户服务订单(核销) + */ + @ApiOperation("创建用户服务订单(核销)") + @PostMapping("/createServiceOrder") + public R createServiceOrder() { + return R.ok(); + } +} diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/CardTemplateService.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/CardTemplateService.java index ee7f963..93e00c2 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/CardTemplateService.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/CardTemplateService.java @@ -1,12 +1,10 @@ package com.cpop.jambox.business.service; import com.cpop.jambox.business.bo.CardTemplateUnionBo; +import com.cpop.jambox.business.entity.CardTemplate; +import com.cpop.jambox.business.vo.LearnNowPayLaterPlanDetailVo; import com.mybatisflex.core.row.Row; import com.mybatisflex.core.service.IService; -import com.cpop.jambox.business.entity.CardTemplate; -import com.cpop.jambox.business.vo.CardTemplateListVo; - -import java.util.List; /** * 果酱-课卡模板 服务层。 @@ -34,4 +32,22 @@ public interface CardTemplateService extends IService { * @return String 旧模板id */ void insertCardTemplateUnion(CardTemplateUnionBo bo); + + /** + * 修改课卡模板(整合) + * @author DB + * @since 2024/1/18 + * @param bo 请求参数 + */ + void updateCardTemplateUnion(CardTemplateUnionBo bo); + + /** + * 获取支付分计划 + * @author DB + * @since 2024/1/18 + * @param oldTemplateId 旧模板id + * @param isMonth 是否月付 + * @return LearnNowPayLaterPlanDetailVo + */ + LearnNowPayLaterPlanDetailVo getWxPayScorePlan(String oldTemplateId, Boolean isMonth); } diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/CardTemplateServiceImpl.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/CardTemplateServiceImpl.java index 9654d20..4277dc0 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/CardTemplateServiceImpl.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/service/impl/CardTemplateServiceImpl.java @@ -1,10 +1,7 @@ package com.cpop.jambox.business.service.impl; -import com.alibaba.fastjson.JSONArray; import com.cpop.common.utils.StringUtils; import com.cpop.common.utils.bean.BeanUtils; -import com.cpop.core.base.entity.LoginUser; -import com.cpop.core.utils.SecurityUtils; import com.cpop.core.utils.SpringUtils; import com.cpop.jambox.business.bo.CardTemplateUnionBo; import com.cpop.jambox.business.entity.BrandExtend; @@ -16,23 +13,24 @@ import com.cpop.jambox.business.service.BrandExtendService; import com.cpop.jambox.business.service.CardTemplateExtendService; import com.cpop.jambox.business.service.CardTemplateService; import com.cpop.jambox.business.service.StoreExtendService; +import com.cpop.jambox.business.vo.LearnNowPayLaterPlanDetailVo; import com.cpop.jambox.framework.tasks.LearnNowPayLaterTask; import com.cpop.system.business.entity.Store; import com.cpop.system.business.service.StoreService; import com.mybatisflex.core.datasource.DataSourceKey; import com.mybatisflex.core.query.QueryWrapper; -import com.mybatisflex.core.row.*; +import com.mybatisflex.core.row.Db; +import com.mybatisflex.core.row.Row; import com.mybatisflex.spring.service.impl.ServiceImpl; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.io.File; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import static com.cpop.jambox.business.entity.table.BrandExtendTableDef.BRAND_EXTEND; +import static com.cpop.jambox.business.entity.table.CardTemplateExtendTableDef.CARD_TEMPLATE_EXTEND; import static com.cpop.jambox.business.entity.table.CardTemplateTableDef.CARD_TEMPLATE; import static com.cpop.jambox.business.entity.table.StoreExtendTableDef.STORE_EXTEND; @@ -95,9 +93,9 @@ public class CardTemplateServiceImpl extends ServiceImpl cardTemplateExtends = new ArrayList<>(); //添加课卡模板拓展 bo.getPayType().forEach(item->{ + //TODO: 新增模板拓展 CardTemplateExtend cardTemplateExtend = new CardTemplateExtend(); - cardTemplateExtend.setTemplateId(cardTemplate.getId()) - .setPayType(item); + cardTemplateExtend.setTemplateId(cardTemplate.getId()).setPayType(item); cardTemplateExtends.add(cardTemplateExtend); }); SpringUtils.getBean(CardTemplateExtendService.class).saveBatch(cardTemplateExtends); @@ -111,4 +109,61 @@ public class CardTemplateServiceImpl extends ServiceImpl cardTemplateExtends = cardTemplateExtendService.list(QueryWrapper.create() + .where(CARD_TEMPLATE_EXTEND.TEMPLATE_ID.eq(bo.getOldTemplateId()))); + //添加课卡模板拓展 + List filterPayType = bo.getPayType().stream().filter(item -> item != 1 && item != 5).collect(Collectors.toList()); + //TODO: 新增或修改模板拓展 + + //次付 + List payTypeList = cardTemplateExtends.stream().map(CardTemplateExtend::getPayType).collect(Collectors.toList()); + if (bo.getPayType().contains(1) && !payTypeList.contains(1)) { + SpringUtils.getBean(LearnNowPayLaterTask.class).asyncCreateLearnNowPayLaterPlan(cardTemplate, bo.getLearnNowPayLaterPay(), 1); + } + if (!bo.getPayType().contains(1) && payTypeList.contains(1)){ + //停用先学后付 + SpringUtils.getBean(CardTemplateExtendService.class).updateChain() + .set(CARD_TEMPLATE_EXTEND.EXTEND_PARAM_ONE, false) + .where(CARD_TEMPLATE_EXTEND.PAY_TYPE.eq(1)) + .and(CARD_TEMPLATE_EXTEND.TEMPLATE_ID.eq(cardTemplate.getId())) + .update(); + } + //月付 + if (bo.getPayType().contains(5) && !payTypeList.contains(5)) { + SpringUtils.getBean(LearnNowPayLaterTask.class).asyncCreateLearnNowPayLaterPlan(cardTemplate, bo.getLearnNowPayLaterMonthPay(), 5); + } + if (!bo.getPayType().contains(1) && payTypeList.contains(1)){ + //停用先学后付 + SpringUtils.getBean(CardTemplateExtendService.class).updateChain() + .set(CARD_TEMPLATE_EXTEND.EXTEND_PARAM_ONE, false) + .where(CARD_TEMPLATE_EXTEND.PAY_TYPE.eq(5)) + .and(CARD_TEMPLATE_EXTEND.TEMPLATE_ID.eq(cardTemplate.getId())) + .update(); + } + } + + /** + * 获取支付分计划 + * @author DB + * @since 2024/1/18 + * @param oldTemplateId 旧模板id + * @param isMonth 是否月付 + * @return LearnNowPayLaterPlanDetailVo + */ + @Override + public LearnNowPayLaterPlanDetailVo getWxPayScorePlan(String oldTemplateId, Boolean isMonth) { + return null; + } + } diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/vo/LearnNowPayLaterPlanDetailVo.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/vo/LearnNowPayLaterPlanDetailVo.java new file mode 100644 index 0000000..9266ea4 --- /dev/null +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/vo/LearnNowPayLaterPlanDetailVo.java @@ -0,0 +1,49 @@ +package com.cpop.jambox.business.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author DB + * @version 1.0.0 + * @since 2024-01-08 9:54 + */ +@Data +@ApiModel(value = "先学后付计划详情") +public class LearnNowPayLaterPlanDetailVo { + + /** + * 计划明细优惠说明 + */ + @ApiModelProperty("计划明细优惠说明") + private String planDiscountDescription; + + /** + * 计划明细原支付金额(单位分) + */ + @ApiModelProperty("计划明细原支付金额(单位分)") + private Integer originalPrice; + + public void setOriginalPrice(BigDecimal originalPrice) { + this.originalPrice = originalPrice.scaleByPowerOfTen(2).intValue(); + } + + /** + * 计划明细实际支付金额(单位分) + */ + @ApiModelProperty("计划明细实际支付金额(单位分)") + private Long actualPrice; + + public void setActualPrice(BigDecimal actualPrice) { + this.actualPrice = actualPrice.scaleByPowerOfTen(2).longValue(); + } + + /** + * 计划明细名称 + */ + @ApiModelProperty("计划明细名称") + private String planDetailName; +} diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/business/vo/LearnNowPayLaterPlanVo.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/vo/LearnNowPayLaterPlanVo.java new file mode 100644 index 0000000..ef453cb --- /dev/null +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/business/vo/LearnNowPayLaterPlanVo.java @@ -0,0 +1,64 @@ +package com.cpop.jambox.business.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author DB + * @version 1.0.0 + * @since 2024-01-05 16:13 + */ +@Data +@ApiModel("先学后付计划") +public class LearnNowPayLaterPlanVo { + + /** + * 支付分计划名称 + */ + @ApiModelProperty("支付分计划名称") + private String planName; + + /** + * 支付分计划有效期(单位天) + */ + @ApiModelProperty("支付分计划有效期(单位天)") + private Integer planDuration; + + /** + * 支付分计划扣费次数 + */ + @ApiModelProperty("支付分计划扣费次数") + private Integer deductionQuantity; + + + /** + * 支付分计划原总金额(单位分) + */ + @ApiModelProperty("支付分计划原总金额") + private Integer totalOriginalPrice; + + public void setTotalOriginalPrice(BigDecimal totalOriginalPrice) { + this.totalOriginalPrice = totalOriginalPrice.scaleByPowerOfTen(2).intValue(); + } + + /** + * 支付分计划实际扣费总金额(单位分) + */ + @ApiModelProperty("支付分计划实际扣费总金额(单位分)") + private Integer totalActualPrice; + + public void setTotalActualPrice(BigDecimal totalActualPrice) { + this.totalActualPrice = totalActualPrice.scaleByPowerOfTen(2).intValue(); + } + + /** + * 支付分计划明细列表 + */ + @ApiModelProperty("支付分计划明细列表") + private List planDetailList; + +} diff --git a/Cpop-Jambox/src/main/java/com/cpop/jambox/framework/tasks/LearnNowPayLaterTask.java b/Cpop-Jambox/src/main/java/com/cpop/jambox/framework/tasks/LearnNowPayLaterTask.java index 965d87d..49635c4 100644 --- a/Cpop-Jambox/src/main/java/com/cpop/jambox/framework/tasks/LearnNowPayLaterTask.java +++ b/Cpop-Jambox/src/main/java/com/cpop/jambox/framework/tasks/LearnNowPayLaterTask.java @@ -3,10 +3,8 @@ package com.cpop.jambox.framework.tasks; import com.cpop.common.utils.bean.BeanUtils; import com.cpop.core.base.exception.ServiceException; import com.cpop.core.utils.SpringUtils; -import com.cpop.jambox.business.bo.CardTemplateUnionBo; import com.cpop.jambox.business.bo.LearnNowPayLaterPlanBo; import com.cpop.jambox.business.entity.CardTemplate; -import com.cpop.jambox.business.entity.CardTemplateExtend; import com.cpop.jambox.business.service.CardTemplateExtendService; import com.cpop.pay.framewok.handler.wxPay.WxPayHandler; import com.cpop.system.business.entity.WxPayScore; @@ -27,7 +25,6 @@ import org.springframework.transaction.annotation.Transactional; import java.util.List; import static com.cpop.jambox.business.entity.table.CardTemplateExtendTableDef.CARD_TEMPLATE_EXTEND; -import static com.cpop.jambox.business.entity.table.CardTemplateTableDef.CARD_TEMPLATE; import static com.cpop.system.business.entity.table.WxPayScoreTableDef.WX_PAY_SCORE; /** @@ -85,6 +82,7 @@ public class LearnNowPayLaterTask { //更新模板拓展 SpringUtils.getBean(CardTemplateExtendService.class).updateChain() .set(CARD_TEMPLATE_EXTEND.EXTEND_ID,wxPayScore.getId()) + .set(CARD_TEMPLATE_EXTEND.EXTEND_PARAM_ONE, true) .where(CARD_TEMPLATE_EXTEND.PAY_TYPE.eq(payType)) .and(CARD_TEMPLATE_EXTEND.TEMPLATE_ID.eq(cardTemplate.getId())) .update(); diff --git a/Cpop-Mall/Cpop-Mall-Web/src/test/java/com/cpop/mall/web/CpopWxPayTests.java b/Cpop-Mall/Cpop-Mall-Web/src/test/java/com/cpop/mall/web/CpopWxPayTests.java index eb61693..34faa32 100644 --- a/Cpop-Mall/Cpop-Mall-Web/src/test/java/com/cpop/mall/web/CpopWxPayTests.java +++ b/Cpop-Mall/Cpop-Mall-Web/src/test/java/com/cpop/mall/web/CpopWxPayTests.java @@ -51,19 +51,18 @@ public class CpopWxPayTests { WxPayRefundV3Request.Amount amount = new WxPayRefundV3Request.Amount(); //退款金额(单位分) //int refund = order.getTotalAmount().scaleByPowerOfTen(2).intValue(); - int refund = 101; + int refund = 1; amount.setRefund(refund) .setTotal(refund) .setCurrency("CNY"); - request.setSubMchid(wxPayService.getConfig().getSubMchId()) - .setTransactionId("4200002126202312283733408828") - .setOutTradeNo("97945790336548864") + request.setTransactionId("4200002122202401129346519359") + //.setOutTradeNo("1000000000202401121937112562856") //.setTransactionId(order.getOutOrderNo()) //.setOutTradeNo(order.getId()) .setNotifyUrl(wxPayProperties.getNotifyRefund()) .setOutRefundNo(IdUtils.fastSimpleUUID()) .setSubMchid("1661323640") - .setReason("一次性支付退款") + .setReason("测试退款") .setAmount(amount); WxPayRefundV3Result result = wxPayService.refundV3(request); System.out.println(result); @@ -163,7 +162,7 @@ public class CpopWxPayTests { */ @Test public void getProfitSharingResult() throws WxPayException { - ProfitSharingV3Result profitSharingV3Result = wxPayService.getProfitSharingService().profitSharingQueryV3("1714609621691420672", "4200002015202310186547802213", "1650816616"); + ProfitSharingV3Result profitSharingV3Result = wxPayService.getProfitSharingService().profitSharingQueryV3("1745800085756895232", "4200002127202401122097980590", "1661323640"); System.out.println(profitSharingV3Result); } @@ -174,8 +173,8 @@ public class CpopWxPayTests { @Test public void profitSharingFinish() throws WxPayException { ProfitSharingUnfreezeRequest profitSharingFinishRequest = new ProfitSharingUnfreezeRequest(); - profitSharingFinishRequest.setTransactionId("4200002093202312282215936862"); - profitSharingFinishRequest.setOutOrderNo("97973671418667008"); + profitSharingFinishRequest.setTransactionId("4200002122202401129346519359"); + profitSharingFinishRequest.setOutOrderNo("1745820005743910912"); profitSharingFinishRequest.setDescription("结束分账"); profitSharingFinishRequest.setSubMchId("1661323640"); wxPayService.getProfitSharingService().profitSharingFinish(profitSharingFinishRequest); diff --git a/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopEasyLearnTest.java b/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopEasyLearnTest.java index 966f6ae..1481ca0 100644 --- a/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopEasyLearnTest.java +++ b/Cpop-Oam/Cpop-Oam-Web/src/test/java/com/cpop/oam/web/CpopEasyLearnTest.java @@ -14,6 +14,7 @@ import com.cpop.pay.framewok.config.wxPay.WxPayProperties; import com.cpop.pay.framewok.handler.wxPay.WxPayHandler; import com.github.binarywang.wxpay.bean.profitsharing.request.ProfitSharingRequest; import com.github.binarywang.wxpay.bean.profitsharing.result.ProfitSharingResult; +import com.github.binarywang.wxpay.bean.request.WxPayPartnerOrderCloseV3Request; import com.github.binarywang.wxpay.config.WxPayConfig; import com.github.binarywang.wxpay.exception.WxPayException; import com.github.binarywang.wxpay.service.WxPayService; @@ -43,7 +44,7 @@ import static com.cpop.jambox.business.entity.table.StoreExtendTableDef.STORE_EX * @since 2023-12-29 9:50 */ @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -@ActiveProfiles({"prod", "core", "jambox"}) +@ActiveProfiles({"dev", "core", "jambox"}) public class CpopEasyLearnTest { @Autowired @@ -199,4 +200,18 @@ public class CpopEasyLearnTest { } } } + + /** + * 关闭服务商订单 + * @author DB + * @since 2024/1/12 + */ + @Test + public void closePartnerOrderV3() throws WxPayException { + WxPayService wxPayService= wxPayHandler.getWxPayService(); + WxPayPartnerOrderCloseV3Request wxPayPartnerOrderCloseV3Request = new WxPayPartnerOrderCloseV3Request(); + wxPayPartnerOrderCloseV3Request.setSubMchId("1661323640"); + wxPayPartnerOrderCloseV3Request.setOutTradeNo("1745820005743910912"); + wxPayService.closePartnerOrderV3(wxPayPartnerOrderCloseV3Request); + } }