fix:新增钱包开通流程及相关接口
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.request.wallet.AccountCreateRequest;
|
||||
import com.cool.store.request.wallet.AccountOpenRequest;
|
||||
import com.cool.store.request.wallet.BankListRequest;
|
||||
import com.cool.store.request.wallet.WalletShopRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.wallet.WalletService;
|
||||
import com.cool.store.vo.wallet.AccountAuthenticationVO;
|
||||
import com.cool.store.vo.wallet.BankVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mini钱包 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2025/11/14
|
||||
*/
|
||||
@Api(tags = "Mini钱包")
|
||||
@RestController
|
||||
@RequestMapping("/mini/wallet")
|
||||
@RequiredArgsConstructor
|
||||
public class MiniWalletController {
|
||||
private final WalletService walletService;
|
||||
|
||||
@ApiOperation("步骤1:平安银行钱包账号创建")
|
||||
@PostMapping("/accountCreate")
|
||||
public ResponseResult<Boolean> accountCreate(@RequestBody @Validated AccountCreateRequest request) {
|
||||
return ResponseResult.success(walletService.accountCreate(request));
|
||||
}
|
||||
|
||||
@ApiOperation("步骤2:鉴权申请")
|
||||
@PostMapping("/authentication")
|
||||
public ResponseResult<AccountAuthenticationVO> authentication(@RequestBody @Validated WalletShopRequest request) {
|
||||
return ResponseResult.success(walletService.authentication(request));
|
||||
}
|
||||
|
||||
@ApiOperation("步骤3:账号开通(步骤2接口返回4时无需调用)")
|
||||
@PostMapping("/openAccount")
|
||||
public ResponseResult<Boolean> openAccount(@RequestBody @Validated AccountOpenRequest request) {
|
||||
return ResponseResult.success(walletService.openAccount(request));
|
||||
}
|
||||
|
||||
@ApiOperation("支行信息查询")
|
||||
@GetMapping("/bankList")
|
||||
public ResponseResult<PageInfo<BankVO>> getBankList(@RequestBody BankListRequest request) {
|
||||
return ResponseResult.success(walletService.getBankList(request));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user