|
|
@@ -6,7 +6,6 @@ import com.sckw.core.web.constant.HttpStatus;
|
|
|
import com.sckw.core.web.context.LoginEntHolder;
|
|
|
import com.sckw.core.web.response.BaseResult;
|
|
|
import com.sckw.payment.api.model.TradeEntInfoResVo;
|
|
|
-import com.sckw.payment.api.model.dto.common.R;
|
|
|
import com.sckw.payment.pojo.CashParaPage;
|
|
|
import com.sckw.payment.pojo.CashVo;
|
|
|
import com.sckw.payment.pojo.UpdateCash;
|
|
|
@@ -69,7 +68,7 @@ public class WalletController {
|
|
|
*/
|
|
|
@Operation(summary = "查询用户钱包信息", description = "查询用户钱包信息")
|
|
|
@GetMapping("/info")
|
|
|
- public R<WalletVo> userInfo() {
|
|
|
+ public BaseResult<WalletVo> userInfo() {
|
|
|
return walletService.userInfo();
|
|
|
}
|
|
|
|
|
|
@@ -78,7 +77,7 @@ public class WalletController {
|
|
|
*/
|
|
|
@Operation(summary = "可提现余额", description = "可提现余额")
|
|
|
@GetMapping("/cashInfo")
|
|
|
- public R<WalletCashVo> cashInfo() {
|
|
|
+ public BaseResult<WalletCashVo> cashInfo() {
|
|
|
return walletService.cashInfo();
|
|
|
}
|
|
|
|
|
|
@@ -87,8 +86,8 @@ public class WalletController {
|
|
|
*/
|
|
|
@Operation(summary = "更新预付直提开关", description = "更新预付直提开关")
|
|
|
@PostMapping("/updateCash")
|
|
|
- public R<Integer> updateCash(@RequestBody @Valid UpdateCash updateCash) {
|
|
|
- return R.ok(walletService.updateCash(updateCash));
|
|
|
+ public BaseResult<Integer> updateCash(@RequestBody @Valid UpdateCash updateCash) {
|
|
|
+ return BaseResult.success(walletService.updateCash(updateCash));
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "查询交易对方企业列表")
|
|
|
@@ -103,8 +102,8 @@ public class WalletController {
|
|
|
@Operation(summary = "可提现余额分页查询", description = "可提现余额分页查询")
|
|
|
@Parameter(name = "entId", description = "企业id", required = true)
|
|
|
@PostMapping("/cashPage")
|
|
|
- public R<PageRes<CashVo>> cashPage(@RequestBody @Valid CashParaPage cashParaPage) {
|
|
|
- return R.ok(walletService.cashPage(cashParaPage));
|
|
|
+ public BaseResult<PageRes<CashVo>> cashPage(@RequestBody @Valid CashParaPage cashParaPage) {
|
|
|
+ return BaseResult.success(walletService.cashPage(cashParaPage));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -115,8 +114,8 @@ public class WalletController {
|
|
|
*/
|
|
|
@Operation(summary = "提现", description = "发起提现操作")
|
|
|
@PostMapping("cashOUt")
|
|
|
- public R<Object> cashOUt(@RequestBody @Valid CashWalletReq cashWalletReq) {
|
|
|
- return R.ok(walletService.cashOUt(cashWalletReq));
|
|
|
+ public BaseResult<Object> cashOUt(@RequestBody @Valid CashWalletReq cashWalletReq) {
|
|
|
+ return BaseResult.success(walletService.cashOUt(cashWalletReq));
|
|
|
}
|
|
|
//1、查询钱包信息
|
|
|
|
|
|
@@ -150,7 +149,7 @@ public class WalletController {
|
|
|
} else if (entTypes.contains(String.valueOf(EntTypeEnum.PURCHASER.getCode()))) {
|
|
|
prepaidQuery.setEntType(EntTypeEnum.PURCHASER.getCode());
|
|
|
}
|
|
|
- R<WalletCashVo> walletCashVoR = walletService.cashInfo();
|
|
|
+ BaseResult<WalletCashVo> walletCashVoR = walletService.cashInfo();
|
|
|
|
|
|
if (HttpStatus.SUCCESS_CODE == walletCashVoR.getCode()) {
|
|
|
WalletCashVo data = walletCashVoR.getData();
|