岗位、岗位地址、企业新增 增加用户类型判断
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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("非法详细地址");
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user