add 新增退款用户余额临时接口

This commit is contained in:
Lemon
2026-05-11 14:39:38 +08:00
parent daf9cbb62d
commit 03f9bbbd15
2 changed files with 35 additions and 0 deletions

View File

@@ -94,6 +94,26 @@ public class TempController extends BaseController {
@Autowired
private EBikeSendCommandService eBikeSendCommandService;
/**
* 临时退款用户余额
* @param dto
* @return
*/
public RestApiResponse<?> tempRefundAmount(@RequestBody ApplyRefundDTO dto) {
RestApiResponse<?> response = null
try {
String mode = pileMerchantInfoService.getDelayModeByWechatAppId(dto.getWechatAppId());
// 获取处理逻辑
AbstractProgramLogic orderLogic = ProgramLogicFactory.getProgramLogic(mode);
orderLogic.refundBalance(dto);
response = new RestApiResponse<>();
} catch (Exception e) {
logger.error("临时退款用户余额 error", e);
response = new RestApiResponse<>(e);
}
return response;
}
/**
* 电单车开始充电
* http://localhost:8080/temp/tempStartCharging

View File

@@ -313,6 +313,21 @@ public class SpringBootTestController {
private final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(10, JsowellThreadFactory.forName("test-thread-factory"));
@Test
public void testRefundAmount() {
ApplyRefundDTO dto = new ApplyRefundDTO();
dto.setMemberId("42833346");
dto.setRefundAmount(new BigDecimal("13.12"));
dto.setWechatAppId(Constants.XIXIAO_APP_ID);
dto.setRefundType("2");
dto.setWalletCode("8986380447445731");
String mode = pileMerchantInfoService.getDelayModeByWechatAppId(dto.getWechatAppId());
// 获取处理逻辑
AbstractProgramLogic orderLogic = ProgramLogicFactory.getProgramLogic(mode);
orderLogic.refundBalance(dto);
}
@Test
public void deleteThirdPartyStationRelationTest() {
ThirdPartyStationRelationDTO dto = new ThirdPartyStationRelationDTO();