!104 优化代码,修复bug

Merge pull request !104 from OceansDeep/feature/pg
This commit is contained in:
OceansDeep
2021-12-30 09:02:56 +00:00
committed by Gitee
7 changed files with 137 additions and 83 deletions

View File

@@ -34,6 +34,7 @@ import javax.validation.constraints.NotNull;
@RestController
@Api(tags = "买家端,分销商品佣金提现接口")
@RequestMapping("/buyer/distribution/cash")
@Validated
public class DistributionCashBuyerController {
/**
@@ -56,7 +57,7 @@ public class DistributionCashBuyerController {
public ResultMessage<Object> cash(@Validated @Max(value = 9999, message = "提现金额单次最多允许提现9999元")
@Min(value = 1, message = "提现金额单次最少提现金额为1元")
@NotNull @ApiIgnore Double price) {
if (distributionCashService.cash(price)) {
if (Boolean.TRUE.equals(distributionCashService.cash(price))) {
return ResultUtil.success();
}
throw new ServiceException(ResultCode.ERROR);