Package com.bytedesk.call.gateway
Class CallGatewayRestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<T,TRequest,TResponse>
com.bytedesk.core.base.BaseRestServiceWithExport<CallGatewayEntity,CallGatewayRequest,CallGatewayResponse,CallGatewayExcel>
com.bytedesk.call.gateway.CallGatewayRestService
@Service
public class CallGatewayRestService
extends BaseRestServiceWithExport<CallGatewayEntity,CallGatewayRequest,CallGatewayResponse,CallGatewayExcel>
Call网关REST服务
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CallGatewayRepositoryprivate final org.modelmapper.ModelMapperFields inherited from class com.bytedesk.core.base.BaseRestService
authService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToExcel(CallGatewayEntity entity) 转换为Excel对象 子类必须实现此方法convertToResponse(CallGatewayEntity entity) create(CallGatewayRequest request) protected org.springframework.data.jpa.domain.Specification<CallGatewayEntity>createSpecification(CallGatewayRequest request) 创建Specification对象,子类必须实现 用于queryByOrg的通用实现voiddelete(CallGatewayRequest request) voiddeleteByUid(String uid) doSave(CallGatewayEntity entity) 子类实现具体的保存逻辑protected org.springframework.data.domain.Page<CallGatewayEntity>executePageQuery(org.springframework.data.jpa.domain.Specification<CallGatewayEntity> spec, org.springframework.data.domain.Pageable pageable) 执行分页查询,子类必须实现 用于queryByOrg的通用实现handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, CallGatewayEntity entity) org.springframework.data.domain.Page<CallGatewayResponse>queryByOrg(CallGatewayRequest request) 通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法org.springframework.data.domain.Page<CallGatewayEntity>queryByOrgEntity(CallGatewayRequest request) 查询实体对象(用于Excel导出) 子类必须实现此方法org.springframework.data.domain.Page<CallGatewayResponse>queryByUser(CallGatewayRequest request) 通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法update(CallGatewayRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestService
deleteByOrgUid, findByOrgUid, getUidFromRequest, queryByUid, recover, save, setUserUidToRequest
-
Field Details
-
gatewayRepository
-
modelMapper
private final org.modelmapper.ModelMapper modelMapper
-
-
Constructor Details
-
CallGatewayRestService
public CallGatewayRestService()
-
-
Method Details
-
createSpecification
protected org.springframework.data.jpa.domain.Specification<CallGatewayEntity> createSpecification(CallGatewayRequest request) Description copied from class:BaseRestService创建Specification对象,子类必须实现 用于queryByOrg的通用实现- Specified by:
createSpecificationin classBaseRestService<CallGatewayEntity,CallGatewayRequest, CallGatewayResponse>
-
executePageQuery
protected org.springframework.data.domain.Page<CallGatewayEntity> executePageQuery(org.springframework.data.jpa.domain.Specification<CallGatewayEntity> spec, org.springframework.data.domain.Pageable pageable) Description copied from class:BaseRestService执行分页查询,子类必须实现 用于queryByOrg的通用实现- Specified by:
executePageQueryin classBaseRestService<CallGatewayEntity,CallGatewayRequest, CallGatewayResponse>
-
queryByOrg
@Cacheable(value="gateway", key="#request.orgUid + \':\' + #request.pageNumber + \':\' + #request.pageSize") public org.springframework.data.domain.Page<CallGatewayResponse> queryByOrg(CallGatewayRequest request) Description copied from class:BaseRestService通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByOrgin classBaseRestService<CallGatewayEntity,CallGatewayRequest, CallGatewayResponse>
-
queryByUser
@Cacheable(value="gateway", key="#request.userUid + \':\' + #request.pageNumber + \':\' + #request.pageSize") public org.springframework.data.domain.Page<CallGatewayResponse> queryByUser(CallGatewayRequest request) Description copied from class:BaseRestService通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByUserin classBaseRestService<CallGatewayEntity,CallGatewayRequest, CallGatewayResponse>
-
create
@CacheEvict(value="gateway", allEntries=true) public CallGatewayResponse create(CallGatewayRequest request) - Specified by:
createin classBaseRestService<CallGatewayEntity,CallGatewayRequest, CallGatewayResponse>
-
update
@CacheEvict(value="gateway", allEntries=true) public CallGatewayResponse update(CallGatewayRequest request) - Specified by:
updatein classBaseRestService<CallGatewayEntity,CallGatewayRequest, CallGatewayResponse>
-
deleteByUid
- Specified by:
deleteByUidin classBaseRestService<CallGatewayEntity,CallGatewayRequest, CallGatewayResponse>
-
queryByOrgEntity
public org.springframework.data.domain.Page<CallGatewayEntity> queryByOrgEntity(CallGatewayRequest request) Description copied from class:BaseRestServiceWithExport查询实体对象(用于Excel导出) 子类必须实现此方法 -
delete
- Specified by:
deletein classBaseRestService<CallGatewayEntity,CallGatewayRequest, CallGatewayResponse>
-
doSave
Description copied from class:BaseRestService子类实现具体的保存逻辑- Specified by:
doSavein classBaseRestService<CallGatewayEntity,CallGatewayRequest, CallGatewayResponse>
-
convertToExcel
Description copied from class:BaseRestServiceWithExport转换为Excel对象 子类必须实现此方法- Specified by:
convertToExcelin classBaseRestServiceWithExport<CallGatewayEntity,CallGatewayRequest, CallGatewayResponse, CallGatewayExcel>
-
findByUid
- Specified by:
findByUidin classBaseRestService<CallGatewayEntity,CallGatewayRequest, CallGatewayResponse>
-
convertToResponse
- Specified by:
convertToResponsein classBaseRestService<CallGatewayEntity,CallGatewayRequest, CallGatewayResponse>
-
handleOptimisticLockingFailureException
public CallGatewayEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, CallGatewayEntity entity) - Specified by:
handleOptimisticLockingFailureExceptionin classBaseRestService<CallGatewayEntity,CallGatewayRequest, CallGatewayResponse>
-