Class ThreadEmotionRestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<T,TRequest,TResponse>
com.bytedesk.core.base.BaseRestServiceWithExport<ThreadEmotionEntity,ThreadEmotionRequest,ThreadEmotionResponse,ThreadEmotionExcel>
com.bytedesk.service.thread_emotion.ThreadEmotionRestService
@Service
public class ThreadEmotionRestService
extends BaseRestServiceWithExport<ThreadEmotionEntity,ThreadEmotionRequest,ThreadEmotionResponse,ThreadEmotionExcel>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.modelmapper.ModelMapperprivate final ThreadEmotionRepositoryprivate final ThreadRestServiceprivate final UidUtilsFields inherited from class com.bytedesk.core.base.BaseRestService
authService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoSummary(ThreadEmotionRequest request) convertToExcel(ThreadEmotionEntity entity) 转换为Excel对象 子类必须实现此方法convertToResponse(ThreadEmotionEntity entity) create(ThreadEmotionRequest request) protected org.springframework.data.jpa.domain.Specification<ThreadEmotionEntity>createSpecification(ThreadEmotionRequest request) 创建Specification对象,子类必须实现 用于queryByOrg的通用实现voiddelete(ThreadEmotionRequest request) voiddeleteByUid(String uid) protected ThreadEmotionEntitydoSave(ThreadEmotionEntity entity) 子类实现具体的保存逻辑protected org.springframework.data.domain.Page<ThreadEmotionEntity>executePageQuery(org.springframework.data.jpa.domain.Specification<ThreadEmotionEntity> spec, org.springframework.data.domain.Pageable pageable) 执行分页查询,子类必须实现 用于queryByOrg的通用实现existsByUid(String uid) findByThreadUid(String threadUid) handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, ThreadEmotionEntity entity) queryByUid(ThreadEmotionRequest request) 通用的queryByUid实现save(ThreadEmotionEntity entity) 保存实体,带重试机制update(ThreadEmotionRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestServiceWithExport
queryByOrgEntityMethods inherited from class com.bytedesk.core.base.BaseRestService
deleteByOrgUid, findByOrgUid, getUidFromRequest, queryByOrg, queryByUser, recover, setUserUidToRequest
-
Field Details
-
threadEmotionRepository
-
modelMapper
private final org.modelmapper.ModelMapper modelMapper -
uidUtils
-
threadRestService
-
-
Constructor Details
-
ThreadEmotionRestService
public ThreadEmotionRestService()
-
-
Method Details
-
createSpecification
protected org.springframework.data.jpa.domain.Specification<ThreadEmotionEntity> createSpecification(ThreadEmotionRequest request) Description copied from class:BaseRestService创建Specification对象,子类必须实现 用于queryByOrg的通用实现- Specified by:
createSpecificationin classBaseRestService<ThreadEmotionEntity,ThreadEmotionRequest, ThreadEmotionResponse>
-
executePageQuery
protected org.springframework.data.domain.Page<ThreadEmotionEntity> executePageQuery(org.springframework.data.jpa.domain.Specification<ThreadEmotionEntity> spec, org.springframework.data.domain.Pageable pageable) Description copied from class:BaseRestService执行分页查询,子类必须实现 用于queryByOrg的通用实现- Specified by:
executePageQueryin classBaseRestService<ThreadEmotionEntity,ThreadEmotionRequest, ThreadEmotionResponse>
-
findByUid
@Cacheable(value="thread_emotion", key="#uid", unless="#result==null") public Optional<ThreadEmotionEntity> findByUid(String uid) - Specified by:
findByUidin classBaseRestService<ThreadEmotionEntity,ThreadEmotionRequest, ThreadEmotionResponse>
-
existsByUid
-
findByThreadUid
@Cacheable(value="thread_emotion", key="#threadUid", unless="#result==null") public Optional<ThreadEmotionEntity> findByThreadUid(String threadUid) -
create
- Specified by:
createin classBaseRestService<ThreadEmotionEntity,ThreadEmotionRequest, ThreadEmotionResponse>
-
update
- Specified by:
updatein classBaseRestService<ThreadEmotionEntity,ThreadEmotionRequest, ThreadEmotionResponse>
-
save
Description copied from class:BaseRestService保存实体,带重试机制- Overrides:
savein classBaseRestService<ThreadEmotionEntity,ThreadEmotionRequest, ThreadEmotionResponse>
-
doSave
Description copied from class:BaseRestService子类实现具体的保存逻辑- Specified by:
doSavein classBaseRestService<ThreadEmotionEntity,ThreadEmotionRequest, ThreadEmotionResponse>
-
deleteByUid
- Specified by:
deleteByUidin classBaseRestService<ThreadEmotionEntity,ThreadEmotionRequest, ThreadEmotionResponse>
-
delete
- Specified by:
deletein classBaseRestService<ThreadEmotionEntity,ThreadEmotionRequest, ThreadEmotionResponse>
-
handleOptimisticLockingFailureException
public ThreadEmotionEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, ThreadEmotionEntity entity) -
convertToResponse
- Specified by:
convertToResponsein classBaseRestService<ThreadEmotionEntity,ThreadEmotionRequest, ThreadEmotionResponse>
-
queryByUid
Description copied from class:BaseRestService通用的queryByUid实现- Overrides:
queryByUidin classBaseRestService<ThreadEmotionEntity,ThreadEmotionRequest, ThreadEmotionResponse>
-
convertToExcel
Description copied from class:BaseRestServiceWithExport转换为Excel对象 子类必须实现此方法 -
autoSummary
-