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