mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-19 06:39:50 +08:00
add 新增退款用户余额临时接口
This commit is contained in:
@@ -94,6 +94,26 @@ public class TempController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private EBikeSendCommandService eBikeSendCommandService;
|
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
|
* http://localhost:8080/temp/tempStartCharging
|
||||||
|
|||||||
@@ -313,6 +313,21 @@ public class SpringBootTestController {
|
|||||||
|
|
||||||
private final ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(10, JsowellThreadFactory.forName("test-thread-factory"));
|
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
|
@Test
|
||||||
public void deleteThirdPartyStationRelationTest() {
|
public void deleteThirdPartyStationRelationTest() {
|
||||||
ThirdPartyStationRelationDTO dto = new ThirdPartyStationRelationDTO();
|
ThirdPartyStationRelationDTO dto = new ThirdPartyStationRelationDTO();
|
||||||
|
|||||||
Reference in New Issue
Block a user