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