Class OrganizationApplyRestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<T,TRequest,TResponse>
com.bytedesk.core.base.BaseRestServiceWithExport<OrganizationApplyEntity,OrganizationApplyRequest,OrganizationApplyResponse,OrganizationApplyExcel>
com.bytedesk.core.rbac.organization_apply.OrganizationApplyRestService
@Service
public class OrganizationApplyRestService
extends BaseRestServiceWithExport<OrganizationApplyEntity,OrganizationApplyRequest,OrganizationApplyResponse,OrganizationApplyExcel>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AuthServiceprivate final org.modelmapper.ModelMapperprivate final OrganizationApplyRepositoryprivate final UidUtils -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription转换为Excel对象 子类必须实现此方法create(OrganizationApplyRequest request) protected org.springframework.data.jpa.domain.Specification<OrganizationApplyEntity>创建Specification对象,子类必须实现 用于queryByOrg的通用实现voiddelete(OrganizationApplyRequest request) voiddeleteByUid(String uid) protected OrganizationApplyEntitydoSave(OrganizationApplyEntity entity) 子类实现具体的保存逻辑protected org.springframework.data.domain.Page<OrganizationApplyEntity>executePageQuery(org.springframework.data.jpa.domain.Specification<OrganizationApplyEntity> spec, org.springframework.data.domain.Pageable pageable) 执行分页查询,子类必须实现 用于queryByOrg的通用实现existsByUid(String uid) handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, OrganizationApplyEntity entity) org.springframework.data.domain.Page<OrganizationApplyResponse>queryByOrg(OrganizationApplyRequest request) 通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法org.springframework.data.domain.Page<OrganizationApplyEntity>queryByOrgEntity(OrganizationApplyRequest request) 查询实体对象(用于Excel导出) 子类必须实现此方法queryByUid(OrganizationApplyRequest request) 通用的queryByUid实现org.springframework.data.domain.Page<OrganizationApplyResponse>queryByUser(OrganizationApplyRequest request) 通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法update(OrganizationApplyRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestService
deleteByOrgUid, findByOrgUid, getUidFromRequest, recover, save, setUserUidToRequest
-
Field Details
-
organizationRepository
-
modelMapper
private final org.modelmapper.ModelMapper modelMapper -
uidUtils
-
authService
-
-
Constructor Details
-
OrganizationApplyRestService
public OrganizationApplyRestService()
-
-
Method Details
-
queryByOrgEntity
public org.springframework.data.domain.Page<OrganizationApplyEntity> queryByOrgEntity(OrganizationApplyRequest request) Description copied from class:BaseRestServiceWithExport查询实体对象(用于Excel导出) 子类必须实现此方法 -
queryByOrg
public org.springframework.data.domain.Page<OrganizationApplyResponse> queryByOrg(OrganizationApplyRequest request) Description copied from class:BaseRestService通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByOrgin classBaseRestService<OrganizationApplyEntity,OrganizationApplyRequest, OrganizationApplyResponse>
-
queryByUser
public org.springframework.data.domain.Page<OrganizationApplyResponse> queryByUser(OrganizationApplyRequest request) Description copied from class:BaseRestService通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByUserin classBaseRestService<OrganizationApplyEntity,OrganizationApplyRequest, OrganizationApplyResponse>
-
queryByUid
Description copied from class:BaseRestService通用的queryByUid实现- Overrides:
queryByUidin classBaseRestService<OrganizationApplyEntity,OrganizationApplyRequest, OrganizationApplyResponse>
-
findByUid
@Cacheable(value="tag", key="#uid", unless="#result==null") public Optional<OrganizationApplyEntity> findByUid(String uid) - Specified by:
findByUidin classBaseRestService<OrganizationApplyEntity,OrganizationApplyRequest, OrganizationApplyResponse>
-
existsByUid
-
create
- Specified by:
createin classBaseRestService<OrganizationApplyEntity,OrganizationApplyRequest, OrganizationApplyResponse>
-
update
- Specified by:
updatein classBaseRestService<OrganizationApplyEntity,OrganizationApplyRequest, OrganizationApplyResponse>
-
doSave
Description copied from class:BaseRestService子类实现具体的保存逻辑- Specified by:
doSavein classBaseRestService<OrganizationApplyEntity,OrganizationApplyRequest, OrganizationApplyResponse>
-
handleOptimisticLockingFailureException
public OrganizationApplyEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, OrganizationApplyEntity entity) -
deleteByUid
- Specified by:
deleteByUidin classBaseRestService<OrganizationApplyEntity,OrganizationApplyRequest, OrganizationApplyResponse>
-
delete
- Specified by:
deletein classBaseRestService<OrganizationApplyEntity,OrganizationApplyRequest, OrganizationApplyResponse>
-
convertToResponse
- Specified by:
convertToResponsein classBaseRestService<OrganizationApplyEntity,OrganizationApplyRequest, OrganizationApplyResponse>
-
convertToExcel
Description copied from class:BaseRestServiceWithExport转换为Excel对象 子类必须实现此方法 -
createSpecification
protected org.springframework.data.jpa.domain.Specification<OrganizationApplyEntity> createSpecification(OrganizationApplyRequest request) Description copied from class:BaseRestService创建Specification对象,子类必须实现 用于queryByOrg的通用实现- Specified by:
createSpecificationin classBaseRestService<OrganizationApplyEntity,OrganizationApplyRequest, OrganizationApplyResponse>
-
executePageQuery
protected org.springframework.data.domain.Page<OrganizationApplyEntity> executePageQuery(org.springframework.data.jpa.domain.Specification<OrganizationApplyEntity> spec, org.springframework.data.domain.Pageable pageable) Description copied from class:BaseRestService执行分页查询,子类必须实现 用于queryByOrg的通用实现- Specified by:
executePageQueryin classBaseRestService<OrganizationApplyEntity,OrganizationApplyRequest, OrganizationApplyResponse>
-