1123
This commit is contained in:
@@ -51,12 +51,14 @@ public class AppBorrowController {
|
|||||||
@ApiOperation(value = "提现")
|
@ApiOperation(value = "提现")
|
||||||
public AjaxResult<Void> withdraw(@ApiParam("提现金额") Double withdrawAmount,String withdrawCode){
|
public AjaxResult<Void> withdraw(@ApiParam("提现金额") Double withdrawAmount,String withdrawCode){
|
||||||
Long customerId = SecurityUtils.getLoginUser().getCustomer().getId();
|
Long customerId = SecurityUtils.getLoginUser().getCustomer().getId();
|
||||||
if(StringUtils.isBlank(withdrawCode)){
|
|
||||||
return AjaxResult.error(MessageUtils.message("dk.withdraw.code.null"));
|
|
||||||
}
|
|
||||||
HomeSetting homeSetting = homeSettingService.getHomeSetting();
|
HomeSetting homeSetting = homeSettingService.getHomeSetting();
|
||||||
if(homeSetting.getOpenWithdrawCode() && !homeSetting.getWithdrawCode().equals(withdrawCode)){
|
if(homeSetting.getOpenWithdrawCode()){
|
||||||
return AjaxResult.error(MessageUtils.message("dk.withdraw.code.error"));
|
if(StringUtils.isBlank(withdrawCode)){
|
||||||
|
return AjaxResult.error(MessageUtils.message("dk.withdraw.code.null"));
|
||||||
|
}
|
||||||
|
if(!homeSetting.getWithdrawCode().equals(withdrawCode)){
|
||||||
|
return AjaxResult.error(MessageUtils.message("dk.withdraw.code.error"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
borrowService.withdraw(withdrawAmount,customerId);
|
borrowService.withdraw(withdrawAmount,customerId);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|||||||
Reference in New Issue
Block a user