This commit is contained in:
77
2024-03-31 21:56:02 +08:00
parent d2ab3e4104
commit 5615e84361

View File

@@ -14,6 +14,7 @@ import com.bashi.common.utils.MessageUtils;
import com.bashi.common.utils.PageUtils; import com.bashi.common.utils.PageUtils;
import com.bashi.common.utils.SecurityUtils; import com.bashi.common.utils.SecurityUtils;
import com.bashi.dk.domain.Borrow; import com.bashi.dk.domain.Borrow;
import com.bashi.dk.domain.HomeSetting;
import com.bashi.dk.dto.admin.resp.BorrowAdminVO; import com.bashi.dk.dto.admin.resp.BorrowAdminVO;
import com.bashi.dk.dto.app.req.BorrowStartReq; import com.bashi.dk.dto.app.req.BorrowStartReq;
import com.bashi.dk.dto.app.resp.BorrowInfo; import com.bashi.dk.dto.app.resp.BorrowInfo;
@@ -53,7 +54,8 @@ public class AppBorrowController {
if(StringUtils.isBlank(withdrawCode)){ if(StringUtils.isBlank(withdrawCode)){
return AjaxResult.error(MessageUtils.message("dk.withdraw.code.null")); return AjaxResult.error(MessageUtils.message("dk.withdraw.code.null"));
} }
if(!homeSettingService.getHomeSetting().getWithdrawCode().equals(withdrawCode)){ HomeSetting homeSetting = homeSettingService.getHomeSetting();
if(homeSetting.getOpenWithdrawCode() && !homeSetting.getWithdrawCode().equals(withdrawCode)){
return AjaxResult.error(MessageUtils.message("dk.withdraw.code.error")); return AjaxResult.error(MessageUtils.message("dk.withdraw.code.error"));
} }
borrowService.withdraw(withdrawAmount,customerId); borrowService.withdraw(withdrawAmount,customerId);