Commit de2ec394 by 罗志长

fix: 租户编辑租户标识

parent 9b27333c
......@@ -24,4 +24,7 @@ public interface PlatLogoConfigService extends IService<PlatLogoConfig> {
* @return
*/
PlatLogoConfigDTOVO view(PlatLogoConfigQueryDTO dto);
void updateByCode(String code, String newCode);
}
package com.makeit.service.platform.sys.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.makeit.dto.platform.sys.PlatLogoConfigDTO;
import com.makeit.dto.platform.sys.PlatLogoConfigDTOVO;
......@@ -66,4 +67,13 @@ public class PlatLogoConfigServiceImpl extends ServiceImpl<PlatLogoConfigMapper,
return data;
}
@Override
@Transactional(rollbackFor = Exception.class)
public void updateByCode(String code, String newCode) {
LambdaUpdateWrapper<PlatLogoConfig> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.set(PlatLogoConfig::getCode, newCode).eq(PlatLogoConfig::getCode, code);
update(updateWrapper);
}
}
......@@ -321,6 +321,10 @@ public class PlatTenantServiceImpl extends ServiceImpl<PlatTenantMapper, PlatTen
//更新组织表
platOrgService.edit(platOrg);
if (!platTenant.getCode().equals(dto.getCode())) {
platLogoConfigService.updateByCode(platTenant.getCode(), dto.getCode());
}
//分配菜单 todo 慢
assignMenuList(tntTenant.getId(), dto.getMenuIdList());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment