|
|
@@ -46,24 +46,22 @@ public class StatusTask { |
|
|
|
//判断项目是否已过有效期 |
|
|
|
boolean falg = date.after(tenantItem.getEndTime()); |
|
|
|
if (falg) { |
|
|
|
log.info("开始禁用对应租户及其用户状态,对应租户id:{}", tenantItem.getTenantId()); |
|
|
|
//过了则更新租户对应项目状态 |
|
|
|
TenantPo tenantPo = tenantMapper.selectById(tenantItem.getTenantId()); |
|
|
|
UserPo userPo = clientUserMapper.selectByUserId(tenantPo.getUserId()); |
|
|
|
if (0 != userPo.getIsExpire()) { |
|
|
|
log.info("开始禁用对应租户及其用户状态,对应租户id:{}", tenantItem.getTenantId()); |
|
|
|
userPo.setIsExpire(0); |
|
|
|
//租户状态完毕 |
|
|
|
clientUserMapper.updatePass(userPo); |
|
|
|
} |
|
|
|
//租户更新完毕 更新对应租户下的用户 |
|
|
|
List<UserPo> userPoList = clientUserMapper.selectByTenantId(userPo.getId()); |
|
|
|
for (UserPo po : userPoList) { |
|
|
|
if (0 != userPo.getIsExpire()) { |
|
|
|
//租户更新完毕 更新对应租户下的用户 |
|
|
|
List<UserPo> userPoList = clientUserMapper.selectByTenantId(userPo.getId()); |
|
|
|
for (UserPo po : userPoList) { |
|
|
|
po.setIsExpire(0); |
|
|
|
clientUserMapper.updatePass(userPo); |
|
|
|
} |
|
|
|
log.info("禁用对应租户及其用户状态完毕"); |
|
|
|
} |
|
|
|
log.info("禁用对应租户及其用户状态完毕"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |