|
|
@@ -0,0 +1,86 @@
|
|
|
+package com.poteviohealth.ym.ipos.controller.app;
|
|
|
+
|
|
|
+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;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 结算管理app
|
|
|
+ * @author Qin
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/ipos/web/settlementApp")
|
|
|
+@Api(value = "SettlementAppController", tags = "结算管理app")
|
|
|
+public class SettlementAppController extends BaseWebController {
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private ISplitService splitService;
|
|
|
+ @Resource
|
|
|
+ private ISplitWithdrawService splitWithdrawService;
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/merchantQuery")
|
|
|
+ @ApiOperation(value = "结算查询")
|
|
|
+ @OperationLog(type = OperateType.SELECT, description ="结算查询")
|
|
|
+ public VaultsResponse<SettlementQueryBack> merchantQuery(@RequestBody SettlementQueryDetail detail) {
|
|
|
+ return splitService.merchantSettlementQuery(detail);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/accountBalanceQuery")
|
|
|
+ @ApiOperation(value = "单账户查询")
|
|
|
+ @OperationLog(type = OperateType.SELECT, description ="单账户查询")
|
|
|
+ public VaultsResponse<AccountBalanceBack> accountBalanceQuery(@RequestBody StringParams params) {
|
|
|
+
|
|
|
+ if(StringUtils.isEmpty(params.getId())){
|
|
|
+ params.setId(TokenContext.cureMiniUser().getIposMerchantId());
|
|
|
+ }
|
|
|
+
|
|
|
+ return splitService.accountBalanceQuery(params.getId());
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/withdraw")
|
|
|
+ @ApiOperation(value = "取现")
|
|
|
+ @OperationLog(type = OperateType.SELECT, description ="取现")
|
|
|
+ public VaultsResponse<WithdrawBack> withdraw(@RequestBody WithdrawDto dto) {
|
|
|
+ if(StringUtils.isEmpty(dto.getMerchantId())){
|
|
|
+ dto.setMerchantId(TokenContext.cureMiniUser().getIposMerchantId());
|
|
|
+ }
|
|
|
+ return splitService.withdraw(dto);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/withdrawQuery")
|
|
|
+ @ApiOperation(value = "取现查询")
|
|
|
+ @OperationLog(type = OperateType.SELECT, description ="取现查询")
|
|
|
+ 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));
|
|
|
+ }
|
|
|
+}
|