zoujiajian před 2 roky
rodič
revize
0a328d7cb0

+ 7 - 0
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonServiceImpl.java

@@ -264,6 +264,8 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 
 	private final EquipmentActivityReduceMapper equipmentActivityReduceMapper;
 
+	private final UserCertRecordMapper userCertRecordMapper;
+
 	private final List<String> noChekGoodsTemp = List.of("Apple One", "Youtube", "Spotify");
 
 	@Transactional(rollbackFor = Throwable.class)
@@ -404,6 +406,11 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 
 		//租赁商品
 		if (goodsDon.getType() == 4) {
+			//是否已实名认证过
+			List<Long> userIdList = userBindRelationService.getRelationUserIdList(userId, user);
+			Integer count = userCertRecordMapper.selectCount(Wrappers.lambdaQuery(UserCertRecord.class).in(UserCertRecord::getUserId, userIdList));
+			if (count == 0) throw BusinessRuntimeException.getInstance("请您先完成实名认证..");
+
 			//租赁商品押金
 			BigDecimal rentGoodsDonDeposit = getRentGoodsDonDeposit(goodsId, sku.getSpecIds());
 			if (rentGoodsDonDeposit == null) throw BusinessRuntimeException.getInstance("应付押金异常..");