|
|
@@ -3,16 +3,22 @@ package com.poteviohealth.ym.ipos.controller;
|
|
|
import com.poteviohealth.cgp.common.controller.BaseWebController;
|
|
|
import com.poteviohealth.cgp.common.facade.log.OperateType;
|
|
|
import com.poteviohealth.cgp.common.facade.log.OperationLog;
|
|
|
+import com.poteviohealth.cgp.common.filter.TokenContext;
|
|
|
import com.poteviohealth.cgp.common.integrated.StringParams;
|
|
|
+import com.poteviohealth.cgp.common.model.CommonPage;
|
|
|
import com.poteviohealth.cgp.common.model.VaultsResponse;
|
|
|
+import com.poteviohealth.ym.ipos.model.split.SplitWithdraw;
|
|
|
import com.poteviohealth.ym.ipos.model.split.back.AccountBalanceBack;
|
|
|
import com.poteviohealth.ym.ipos.model.split.back.SettlementQueryBack;
|
|
|
import com.poteviohealth.ym.ipos.model.split.back.WithdrawBack;
|
|
|
import com.poteviohealth.ym.ipos.model.split.detail.SettlementQueryDetail;
|
|
|
+import com.poteviohealth.ym.ipos.model.split.dto.SplitWithdrawDto;
|
|
|
import com.poteviohealth.ym.ipos.model.split.dto.WithdrawDto;
|
|
|
import com.poteviohealth.ym.ipos.service.ISplitService;
|
|
|
+import com.poteviohealth.ym.ipos.service.ISplitWithdrawService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
@@ -31,6 +37,8 @@ public class SettlementController extends BaseWebController {
|
|
|
|
|
|
@Resource
|
|
|
private ISplitService splitService;
|
|
|
+ @Resource
|
|
|
+ private ISplitWithdrawService splitWithdrawService;
|
|
|
|
|
|
|
|
|
@PostMapping("/merchantQuery")
|
|
|
@@ -44,6 +52,11 @@ public class SettlementController extends BaseWebController {
|
|
|
@ApiOperation(value = "单账户查询")
|
|
|
@OperationLog(type = OperateType.SELECT, description ="单账户查询")
|
|
|
public VaultsResponse<AccountBalanceBack> accountBalanceQuery(@RequestBody StringParams params) {
|
|
|
+
|
|
|
+ if(StringUtils.isEmpty(params.getId())){
|
|
|
+ params.setId(TokenContext.cureWebUser().getIposMerchantId());
|
|
|
+ }
|
|
|
+
|
|
|
return splitService.accountBalanceQuery(params.getId());
|
|
|
}
|
|
|
|
|
|
@@ -51,6 +64,9 @@ public class SettlementController extends BaseWebController {
|
|
|
@ApiOperation(value = "取现")
|
|
|
@OperationLog(type = OperateType.SELECT, description ="取现")
|
|
|
public VaultsResponse<WithdrawBack> withdraw(@RequestBody WithdrawDto dto) {
|
|
|
+ if(StringUtils.isEmpty(dto.getMerchantId())){
|
|
|
+ dto.setMerchantId(TokenContext.cureWebUser().getIposMerchantId());
|
|
|
+ }
|
|
|
return splitService.withdraw(dto);
|
|
|
}
|
|
|
|
|
|
@@ -61,4 +77,10 @@ public class SettlementController extends BaseWebController {
|
|
|
public VaultsResponse<WithdrawBack> withdrawQuery(@RequestBody StringParams params) {
|
|
|
return splitService.withdrawQuery(params.getId());
|
|
|
}
|
|
|
+
|
|
|
+ @PostMapping("/list")
|
|
|
+ @ApiOperation(value = "取现记录",notes = "list")
|
|
|
+ public VaultsResponse<CommonPage<SplitWithdraw>> list(@RequestBody SplitWithdrawDto dto){
|
|
|
+ return VaultsResponse.success(splitWithdrawService.pageList(dto));
|
|
|
+ }
|
|
|
}
|