fixbug:提现申请充值业务问题处理

This commit is contained in:
Chopper711
2023-03-01 10:37:08 +08:00
parent 967852f84d
commit 61104b9cd3
10 changed files with 142 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -26,6 +27,7 @@ import javax.validation.constraints.Min;
@RestController
@Api(tags = "买家端,预存款充值记录接口")
@RequestMapping("/buyer/trade/recharge")
@Validated
public class RechargeTradeBuyerController {
@Autowired
@@ -37,7 +39,10 @@ public class RechargeTradeBuyerController {
@ApiImplicitParams({
@ApiImplicitParam(name = "price", value = "充值金额", required = true, dataType = "double", paramType = "query")
})
public ResultMessage<Recharge> create(@Max(value = 10000, message = "充值金额单次最多允许充值10000元") @Min(value = 1, message = "充值金额单次最少充值金额为1元") Double price) {
public ResultMessage<Recharge> create(
@Max(value = 10000, message = "充值金额单次最多允许充值10000元")
@Min(value = 1, message = "充值金额单次最少充值金额为1元")
Double price) {
Recharge recharge = this.rechargeService.recharge(price);
return ResultUtil.data(recharge);
}

View File

@@ -21,6 +21,7 @@ import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.Max;
@@ -36,6 +37,7 @@ import javax.validation.constraints.Pattern;
@RestController
@Api(tags = "买家端,会员余额接口")
@RequestMapping("/buyer/wallet/wallet")
@Validated
public class MemberWalletBuyerController {
/**
@@ -127,7 +129,10 @@ public class MemberWalletBuyerController {
@ApiImplicitParams({
@ApiImplicitParam(name = "price", value = "提现金额", required = true, dataType = "double", paramType = "query")
})
public ResultMessage<Boolean> withdrawal(@Max(value = 9999, message = "充值金额单次最多允许提现9999元") @Min(value = 1, message = "充值金额单次最少提现金额为1元") Double price) {
public ResultMessage<Boolean> withdrawal(
@Max(value = 9999, message = "提现金额单次最多允许提现9999元")
@Min(value = 1, message = "提现金额单次最少提现金额为1元")
Double price) {
return ResultUtil.data(memberWalletService.applyWithdrawal(price));
}