分页查询增加用户类型判断
This commit is contained in:
@@ -23,6 +23,7 @@ import com.newyetai.recruit.company.service.IHrCompanyService;
|
|||||||
import com.newyetai.component.dict.util.DictUtils;
|
import com.newyetai.component.dict.util.DictUtils;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import com.newyetai.usercenter.user.constant.UserTypeEnum;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
@@ -113,6 +114,7 @@ public class HrCompanyServiceImpl implements IHrCompanyService {
|
|||||||
public List<HrCompanyDTO> page(HrCompanyPageQueryDTO pageQueryDTO) {
|
public List<HrCompanyDTO> page(HrCompanyPageQueryDTO pageQueryDTO) {
|
||||||
if (pageQueryDTO.getOrgId() == null) {
|
if (pageQueryDTO.getOrgId() == null) {
|
||||||
if (!CommonConstants.PLATFORM_ORG_ID.equals(UserContextHolder.getExistLoginOrgId())) {
|
if (!CommonConstants.PLATFORM_ORG_ID.equals(UserContextHolder.getExistLoginOrgId())) {
|
||||||
|
Assert.isTrue(!(UserTypeEnum.PERSON.getType().equals(UserContextHolder.getExistUserType())),"用户类型不匹配");
|
||||||
pageQueryDTO.setOrgId(UserContextHolder.getLoginOrgId());
|
pageQueryDTO.setOrgId(UserContextHolder.getLoginOrgId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -244,6 +246,7 @@ public class HrCompanyServiceImpl implements IHrCompanyService {
|
|||||||
public List<HrCompanyDTO> auditPage(HrCompanyPageQueryDTO pageQueryDTO) {
|
public List<HrCompanyDTO> auditPage(HrCompanyPageQueryDTO pageQueryDTO) {
|
||||||
if (pageQueryDTO.getOrgId() == null) {
|
if (pageQueryDTO.getOrgId() == null) {
|
||||||
if (!CommonConstants.PLATFORM_ORG_ID.equals(UserContextHolder.getExistLoginOrgId())) {
|
if (!CommonConstants.PLATFORM_ORG_ID.equals(UserContextHolder.getExistLoginOrgId())) {
|
||||||
|
Assert.isTrue(!(UserTypeEnum.PERSON.getType().equals(UserContextHolder.getExistUserType())),"用户类型不匹配");
|
||||||
pageQueryDTO.setOrgId(UserContextHolder.getLoginOrgId());
|
pageQueryDTO.setOrgId(UserContextHolder.getLoginOrgId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.newyetai.recruit.position.dto.PositionAddressQueryDTO;
|
|||||||
import com.newyetai.recruit.position.entity.PositionAddress;
|
import com.newyetai.recruit.position.entity.PositionAddress;
|
||||||
import com.newyetai.recruit.position.service.PositionAddressService;
|
import com.newyetai.recruit.position.service.PositionAddressService;
|
||||||
|
|
||||||
|
import com.newyetai.usercenter.user.constant.UserTypeEnum;
|
||||||
import org.apache.commons.compress.utils.Lists;
|
import org.apache.commons.compress.utils.Lists;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -64,6 +65,7 @@ public class PositionAddressServiceImpl implements PositionAddressService {
|
|||||||
@Override
|
@Override
|
||||||
public List<PositionAddressDTO> list(PositionAddressQueryDTO queryDTO) {
|
public List<PositionAddressDTO> list(PositionAddressQueryDTO queryDTO) {
|
||||||
if (!CommonConstants.PLATFORM_ORG_ID.equals(UserContextHolder.getExistLoginOrgId())) {
|
if (!CommonConstants.PLATFORM_ORG_ID.equals(UserContextHolder.getExistLoginOrgId())) {
|
||||||
|
Assert.isTrue(!(UserTypeEnum.PERSON.getType().equals(UserContextHolder.getExistUserType())),"用户类型不匹配");
|
||||||
queryDTO.setOrgId(UserContextHolder.getLoginOrgId());
|
queryDTO.setOrgId(UserContextHolder.getLoginOrgId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user