fix 修正 SysTenantServiceImpl#deleteWithValidByIds 超管租户可以被删除的问题, 加上 id 校验 ;

fix 修正 tenant/index.vue handleUpdate 租户套餐回显问题 ;
feature/model
zlyx 2 years ago
parent fcea03a975
commit e7242d4011

@ -278,6 +278,9 @@ public class SysTenantServiceImpl implements ISysTenantService {
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if (isValid) { if (isValid) {
// 做一些业务上的校验,判断是否需要校验 // 做一些业务上的校验,判断是否需要校验
if (ids.contains(TenantConstants.SUPER_ADMIN_ID)) {
throw new ServiceException("超管租户不能删除");
}
} }
return baseMapper.deleteBatchIds(ids) > 0; return baseMapper.deleteBatchIds(ids) > 0;
} }

@ -360,6 +360,7 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.loading = true; this.loading = true;
this.reset(); this.reset();
this.getTenantPackage();
const id = row.id || this.ids const id = row.id || this.ids
getTenant(id).then(response => { getTenant(id).then(response => {
this.loading = false; this.loading = false;

Loading…
Cancel
Save