1. 同步 base-version

This commit is contained in:
chenbowen
2025-09-18 00:51:31 +08:00
parent dadf77b668
commit 76dd62665f
24 changed files with 666 additions and 37 deletions

View File

@@ -20,8 +20,6 @@ import java.lang.reflect.Field;
import java.time.LocalDateTime;
import java.util.*;
import static cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants.USER_NOT_SET_DEPT;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
/**
@@ -160,10 +158,11 @@ public class DefaultDBFieldHandler implements MetaObjectHandler {
Set<Long> postIds = new HashSet<>(JSONUtil.parseArray(
loginUser.getInfo().getOrDefault(LoginUser.INFO_KEY_POST_IDS, "[]")
).toList(Long.class));
// 阻碍部分场景的使用,不强制校验
// 如果 visitCompanyId 不存在,不能进行业务办理
if (Objects.isNull(visitCompanyId) || Objects.isNull(visitDeptId)) {
throw exception(USER_NOT_SET_DEPT);
}
// if (Objects.isNull(visitCompanyId) || Objects.isNull(visitDeptId)) {
// throw exception(USER_NOT_SET_DEPT);
// }
businessBaseDO.setCompanyId(visitCompanyId);
businessBaseDO.setCompanyName(loginUser.getVisitCompanyName());
businessBaseDO.setDeptId(visitDeptId);