feat:
1. 增加银行卡信息查询 2. 增加银行卡验证 3. 新增用户银行卡模块
This commit is contained in:
@@ -188,8 +188,7 @@ public class MarketUserController {
|
|||||||
@ApiOperationSupport(order = 19)
|
@ApiOperationSupport(order = 19)
|
||||||
@Operation(summary = "是否已验证银行卡")
|
@Operation(summary = "是否已验证银行卡")
|
||||||
public R hasVerifyBankCard() {
|
public R hasVerifyBankCard() {
|
||||||
//todo: 实现 cache
|
return R.status(bankCardService.hasVerifyBankCard(AuthUtil.getUserId()));
|
||||||
return R.status(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/bank-card-anti-check")
|
@GetMapping("/bank-card-anti-check")
|
||||||
|
|||||||
@@ -56,4 +56,7 @@ public interface IMarketBankCardService extends BaseService<MarketBankCardEntity
|
|||||||
MarketBankCardApiVO antiCheck(Long userId, String cardNumber);
|
MarketBankCardApiVO antiCheck(Long userId, String cardNumber);
|
||||||
|
|
||||||
Boolean setDefault(Long userId, Long id);
|
Boolean setDefault(Long userId, Long id);
|
||||||
|
|
||||||
|
Boolean hasVerifyBankCard(Long userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,6 +136,14 @@ public class MarketBankCardServiceImpl extends BaseServiceImpl<MarketBankCardMap
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean hasVerifyBankCard(Long userId) {
|
||||||
|
if (userId == null){
|
||||||
|
throw new ServiceException("未登录用户");
|
||||||
|
}
|
||||||
|
return exists(Wrappers.lambdaQuery(MarketBankCardEntity.class).eq(MarketBankCardEntity::getUserId, userId).eq(MarketBankCardEntity::getIsDeleted, 0));
|
||||||
|
}
|
||||||
|
|
||||||
private void validate(Long userId, String cardNumber) {
|
private void validate(Long userId, String cardNumber) {
|
||||||
if (userId == null){
|
if (userId == null){
|
||||||
throw new ServiceException("未登录用户");
|
throw new ServiceException("未登录用户");
|
||||||
|
|||||||
Reference in New Issue
Block a user