|
@@ -276,12 +276,8 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
|
|
|
if (student == null) {
|
|
|
throw new BizException("学生不存在");
|
|
|
}
|
|
|
- Long tenantId = -1L;
|
|
|
- if (student.getTenantId() != null) {
|
|
|
- tenantId = student.getTenantId();
|
|
|
- }
|
|
|
TenantActivationCode code = baseMapper.selectById(id);
|
|
|
- if(code == null || !code.getTenantId().equals(tenantId)) {
|
|
|
+ if(code == null) {
|
|
|
throw new BizException("激活码不存在");
|
|
|
}
|
|
|
SysUser sysUser = sysUserService.getDao().selectById(student.getUserId());
|
|
@@ -312,7 +308,7 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
|
|
|
|
|
|
// 更新购买记录中激活码使用统计数量值
|
|
|
Integer activeCodeNumber = this.lambdaQuery()
|
|
|
- .eq(TenantActivationCode::getTenantId, tenantId)
|
|
|
+ .eq(TenantActivationCode::getTenantId, code.getTenantId())
|
|
|
.eq(TenantActivationCode::getTenantAlbumPurchaseId, code.getTenantAlbumPurchaseId())
|
|
|
.eq(TenantActivationCode::getActivationStatus, true).count();
|
|
|
|