岗位、岗位地址、企业新增 增加用户类型判断

This commit is contained in:
guixinman
2025-07-31 17:26:23 +08:00
parent b43563546a
commit 0b75af1555
3 changed files with 4 additions and 0 deletions

View File

@@ -52,6 +52,8 @@ public class HrCompanyServiceImpl implements IHrCompanyService {
@Override
public Long create(HrCompanyDTO hrCompanyDTO) {
Assert.isTrue(!(UserTypeEnum.PERSON.getType().equals(UserContextHolder.getExistUserType())),"用户类型不匹配");
//只有入住审批创建的。才能指定orgId。其他的模式都是获取当前登录机构
Long orgId = (StringUtils.equals(HrCompanyEnum.SELF.getType(),hrCompanyDTO.getCompanyType()) && Objects.nonNull(hrCompanyDTO.getOrgId()) )
? hrCompanyDTO.getOrgId() : UserContextHolder.getLoginOrgId();

View File

@@ -38,6 +38,7 @@ public class PositionAddressServiceImpl implements PositionAddressService {
@Override
public Long createOrUpdate(PositionAddressOperatorDTO operatorDTO) {
Assert.isTrue(!(UserTypeEnum.PERSON.getType().equals(UserContextHolder.getExistUserType())),"用户类型不匹配");
if (!SensitiveWordUtils.check(operatorDTO.getDetailAddress())) {
throw new BusinessException("非法详细地址");
}

View File

@@ -93,6 +93,7 @@ public class PositionAuditServiceImpl implements PositionAuditService {
@Transactional(rollbackFor = Exception.class)
@Override
public PositionAudit positionCreate(PositionNewOperatorDTO operatorDto) {
Assert.isTrue(!(UserTypeEnum.PERSON.getType().equals(UserContextHolder.getExistUserType())),"用户类型不匹配");
//校验 敏感词 and 其他
this.check(operatorDto);