Package com.bytedesk.call.janus_video
Class JanusVideoRestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<T,TRequest,TResponse>
com.bytedesk.core.base.BaseRestServiceWithExport<JanusVideoEntity,JanusVideoRequest,JanusVideoResponse,JanusVideoExcel>
com.bytedesk.call.janus_video.JanusVideoRestService
@Service
public class JanusVideoRestService
extends BaseRestServiceWithExport<JanusVideoEntity,JanusVideoRequest,JanusVideoResponse,JanusVideoExcel>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.modelmapper.ModelMapperprivate final UidUtilsprivate final JanusVideoRepositoryFields inherited from class com.bytedesk.core.base.BaseRestService
authService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToExcel(JanusVideoEntity entity) 转换为Excel对象 子类必须实现此方法convertToResponse(JanusVideoEntity entity) create(JanusVideoRequest request) protected org.springframework.data.jpa.domain.Specification<JanusVideoEntity>createSpecification(JanusVideoRequest request) 创建Specification对象,子类必须实现 用于queryByOrg的通用实现voiddelete(JanusVideoRequest request) voiddeleteByUid(String uid) protected JanusVideoEntitydoSave(JanusVideoEntity entity) 子类实现具体的保存逻辑protected org.springframework.data.domain.Page<JanusVideoEntity>executePageQuery(org.springframework.data.jpa.domain.Specification<JanusVideoEntity> spec, org.springframework.data.domain.Pageable pageable) 执行分页查询,子类必须实现 用于queryByOrg的通用实现existsByUid(String uid) findByNameAndOrgUidAndType(String name, String orgUid, String type) handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, JanusVideoEntity entity) voidinitJanusVideos(String orgUid) update(JanusVideoRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestServiceWithExport
queryByOrgEntityMethods inherited from class com.bytedesk.core.base.BaseRestService
deleteByOrgUid, findByOrgUid, getUidFromRequest, queryByOrg, queryByUid, queryByUser, recover, save, setUserUidToRequest
-
Field Details
-
videoRepository
-
modelMapper
private final org.modelmapper.ModelMapper modelMapper -
uidUtils
-
-
Constructor Details
-
JanusVideoRestService
public JanusVideoRestService()
-
-
Method Details
-
createSpecification
protected org.springframework.data.jpa.domain.Specification<JanusVideoEntity> createSpecification(JanusVideoRequest request) Description copied from class:BaseRestService创建Specification对象,子类必须实现 用于queryByOrg的通用实现- Specified by:
createSpecificationin classBaseRestService<JanusVideoEntity,JanusVideoRequest, JanusVideoResponse>
-
executePageQuery
protected org.springframework.data.domain.Page<JanusVideoEntity> executePageQuery(org.springframework.data.jpa.domain.Specification<JanusVideoEntity> spec, org.springframework.data.domain.Pageable pageable) Description copied from class:BaseRestService执行分页查询,子类必须实现 用于queryByOrg的通用实现- Specified by:
executePageQueryin classBaseRestService<JanusVideoEntity,JanusVideoRequest, JanusVideoResponse>
-
findByUid
@Cacheable(value="janus_video", key="#uid", unless="#result==null") public Optional<JanusVideoEntity> findByUid(String uid) - Specified by:
findByUidin classBaseRestService<JanusVideoEntity,JanusVideoRequest, JanusVideoResponse>
-
findByNameAndOrgUidAndType
@Cacheable(value="janus_video", key="#name + \'_\' + #orgUid + \'_\' + #type", unless="#result==null") public Optional<JanusVideoEntity> findByNameAndOrgUidAndType(String name, String orgUid, String type) -
existsByUid
-
create
- Specified by:
createin classBaseRestService<JanusVideoEntity,JanusVideoRequest, JanusVideoResponse>
-
update
- Specified by:
updatein classBaseRestService<JanusVideoEntity,JanusVideoRequest, JanusVideoResponse>
-
doSave
Description copied from class:BaseRestService子类实现具体的保存逻辑- Specified by:
doSavein classBaseRestService<JanusVideoEntity,JanusVideoRequest, JanusVideoResponse>
-
handleOptimisticLockingFailureException
public JanusVideoEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, JanusVideoEntity entity) - Specified by:
handleOptimisticLockingFailureExceptionin classBaseRestService<JanusVideoEntity,JanusVideoRequest, JanusVideoResponse>
-
deleteByUid
- Specified by:
deleteByUidin classBaseRestService<JanusVideoEntity,JanusVideoRequest, JanusVideoResponse>
-
delete
- Specified by:
deletein classBaseRestService<JanusVideoEntity,JanusVideoRequest, JanusVideoResponse>
-
convertToResponse
- Specified by:
convertToResponsein classBaseRestService<JanusVideoEntity,JanusVideoRequest, JanusVideoResponse>
-
convertToExcel
Description copied from class:BaseRestServiceWithExport转换为Excel对象 子类必须实现此方法- Specified by:
convertToExcelin classBaseRestServiceWithExport<JanusVideoEntity,JanusVideoRequest, JanusVideoResponse, JanusVideoExcel>
-
initJanusVideos
-