feat(system): 更新租户信息时同步修改用户昵称
- 在更新租户信息时,同步修改对应用户的昵称为租户公司名称 - 移除了未使用的导入和变量
This commit is contained in:
@@ -27,8 +27,6 @@ import org.dromara.mall.mapper.*;
|
||||
import org.dromara.mall.service.ITzWithdrawRequestService;
|
||||
import org.dromara.system.domain.SysDictData;
|
||||
import org.dromara.system.mapper.SysDictDataMapper;
|
||||
import org.dromara.system.mapper.SysTenantMapper;
|
||||
import org.dromara.system.service.ISysTenantService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -55,16 +53,7 @@ public class TzWithdrawRequestServiceImpl extends MPJBaseServiceImpl<TzWithdrawR
|
||||
|
||||
private final HyPromoterMapper promoterMapper;
|
||||
|
||||
private final TzTenantRecordMapper tententRecordMapper;
|
||||
|
||||
private final SysTenantMapper tenantMapper;
|
||||
|
||||
private final ISysTenantService tenantService;
|
||||
|
||||
private final SysDictDataMapper dictDataMapper;
|
||||
|
||||
private final TzBankCardMapper bankCardMapper;
|
||||
|
||||
/**
|
||||
* 查询提现申请
|
||||
*
|
||||
|
||||
@@ -351,6 +351,10 @@ public class SysTenantServiceImpl implements ISysTenantService {
|
||||
@CacheEvict(cacheNames = CacheNames.SYS_TENANT, key = "#bo.tenantId")
|
||||
@Override
|
||||
public Boolean updateByBo(SysTenantBo bo) {
|
||||
SysUser user = userMapper.selectOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getTenantId, bo.getTenantId()));
|
||||
user.setNickName(bo.getCompanyName());
|
||||
userMapper.updateById(user);
|
||||
|
||||
SysTenant tenant = MapstructUtils.convert(bo, SysTenant.class);
|
||||
tenant.setTenantId(null);
|
||||
tenant.setPackageId(null);
|
||||
|
||||
Reference in New Issue
Block a user