|
@@ -272,6 +272,7 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
|
|
|
for (List<String> codes : codePartition) {
|
|
|
List<TenantActivationCode> activationCodes = this.lambdaQuery()
|
|
|
.eq(TenantActivationCode::getTenantId, tenantId)
|
|
|
+ .eq(TenantActivationCode::getTenantAlbumPurchaseId, tenantAlbumPurchaseId)
|
|
|
.in(TenantActivationCode::getActivationCode, codes).list();
|
|
|
|
|
|
// 存在无效码或者已经使用过的码
|
|
@@ -289,11 +290,15 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- activationCodes.forEach(next -> {
|
|
|
+ List<TenantActivationCode> updateDataList = activationCodes.stream().map(next -> {
|
|
|
+ TenantActivationCode tenantActivationCode = new TenantActivationCode();
|
|
|
+ tenantActivationCode.setId(next.getId());
|
|
|
next.setActivationPhone(codePhoneMap.get(next.getActivationCode()));
|
|
|
next.setSendStatus(EActivationCode.SEND);
|
|
|
- });
|
|
|
- tenantActivationCodes.addAll(activationCodes);
|
|
|
+ return tenantActivationCode;
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+
|
|
|
+ tenantActivationCodes.addAll(updateDataList);
|
|
|
}
|
|
|
if (!errMsg.isEmpty()) {
|
|
|
throw new BizException(String.join(",", errMsg));
|