Merge remote-tracking branch 'origin/test'

pull/17/head
Jruome 2023-06-16 11:37:35 +08:00
commit d707770dac
4 changed files with 22 additions and 2 deletions

View File

@ -23,7 +23,7 @@ public class PageParam implements Serializable {
@Schema(description = "每页条数,最大值为 10000", required = true, example = "10")
@NotNull(message = "每页条数不能为空")
@Min(value = 1, message = "每页条数最小值为 1")
@Max(value = 100, message = "每页条数最大值为 10000")
@Max(value = 10000, message = "每页条数最大值为 10000")
private Integer pageSize = PAGE_SIZE;
}

View File

@ -118,4 +118,11 @@ public interface DeptService {
void validateDeptList(Collection<Long> ids);
void batchImport(MultipartFile file);
/**
* tenantId
* @param tenantId
* @return
*/
DeptDO getById(Long tenantId);
}

View File

@ -397,4 +397,9 @@ public class DeptServiceImpl implements DeptService {
}
}
@Override
public DeptDO getById(Long tenantId) {
return deptMapper.selectOne(Wrappers.<DeptDO>lambdaQuery().eq(DeptDO::getTenantId, tenantId).eq(DeptDO::getParentId, 0L).last("limit 1"));
}
}

View File

@ -11,9 +11,11 @@ import cn.iocoder.yudao.framework.tenant.config.TenantProperties;
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils;
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptCreateReqVO;
import cn.iocoder.yudao.module.system.controller.admin.dept.vo.dept.DeptUpdateReqVO;
import cn.iocoder.yudao.module.system.controller.admin.permission.vo.role.RoleCreateReqVO;
import cn.iocoder.yudao.module.system.controller.admin.tenant.vo.tenant.*;
import cn.iocoder.yudao.module.system.convert.tenant.TenantConvert;
import cn.iocoder.yudao.module.system.dal.dataobject.dept.DeptDO;
import cn.iocoder.yudao.module.system.dal.dataobject.permission.MenuDO;
import cn.iocoder.yudao.module.system.dal.dataobject.permission.RoleDO;
import cn.iocoder.yudao.module.system.dal.dataobject.tenant.TenantDO;
@ -168,6 +170,12 @@ public class TenantServiceImpl implements TenantService {
if (ObjectUtil.notEqual(tenant.getPackageId(), updateReqVO.getPackageId())) {
updateTenantRoleMenu(tenant.getId(), tenantPackage.getMenuIds());
}
// 同步修改部门信息
DeptUpdateReqVO reqVO = new DeptUpdateReqVO();
DeptDO dept = deptService.getDept(updateReqVO.getId());
reqVO.setName(updateReqVO.getName());
reqVO.setId(dept.getId());
deptService.updateDept(reqVO);
}
/**