Package com.bytedesk.ticket.attachment
Class TicketAttachmentRestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<TicketAttachmentEntity,TicketAttachmentRequest,TicketAttachmentResponse>
com.bytedesk.ticket.attachment.TicketAttachmentRestService
@Service
public class TicketAttachmentRestService
extends BaseRestService<TicketAttachmentEntity,TicketAttachmentRequest,TicketAttachmentResponse>
-
Field Summary
Fields inherited from class com.bytedesk.core.base.BaseRestService
authService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(TicketAttachmentRequest request) protected org.springframework.data.jpa.domain.Specification<TicketAttachmentEntity>创建Specification对象,子类必须实现 用于queryByOrg的通用实现voiddelete(TicketAttachmentRequest request) voiddeleteByUid(String uid) protected TicketAttachmentEntitydoSave(TicketAttachmentEntity entity) 子类实现具体的保存逻辑protected org.springframework.data.domain.Page<TicketAttachmentEntity>executePageQuery(org.springframework.data.jpa.domain.Specification<TicketAttachmentEntity> specification, org.springframework.data.domain.Pageable pageable) 执行分页查询,子类必须实现 用于queryByOrg的通用实现handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, TicketAttachmentEntity entity) org.springframework.data.domain.Page<TicketAttachmentResponse>queryByOrg(TicketAttachmentRequest request) 通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法org.springframework.data.domain.Page<TicketAttachmentResponse>queryByUser(TicketAttachmentRequest request) 通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法save(TicketAttachmentEntity entity) 保存实体,带重试机制update(TicketAttachmentRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestService
deleteByOrgUid, findByOrgUid, getUidFromRequest, queryByUid, recover, setUserUidToRequest
-
Constructor Details
-
TicketAttachmentRestService
public TicketAttachmentRestService()
-
-
Method Details
-
queryByOrg
public org.springframework.data.domain.Page<TicketAttachmentResponse> queryByOrg(TicketAttachmentRequest request) Description copied from class:BaseRestService通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByOrgin classBaseRestService<TicketAttachmentEntity,TicketAttachmentRequest, TicketAttachmentResponse>
-
queryByUser
public org.springframework.data.domain.Page<TicketAttachmentResponse> queryByUser(TicketAttachmentRequest request) Description copied from class:BaseRestService通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByUserin classBaseRestService<TicketAttachmentEntity,TicketAttachmentRequest, TicketAttachmentResponse>
-
create
- Specified by:
createin classBaseRestService<TicketAttachmentEntity,TicketAttachmentRequest, TicketAttachmentResponse>
-
update
- Specified by:
updatein classBaseRestService<TicketAttachmentEntity,TicketAttachmentRequest, TicketAttachmentResponse>
-
delete
- Specified by:
deletein classBaseRestService<TicketAttachmentEntity,TicketAttachmentRequest, TicketAttachmentResponse>
-
deleteByUid
- Specified by:
deleteByUidin classBaseRestService<TicketAttachmentEntity,TicketAttachmentRequest, TicketAttachmentResponse>
-
findByUid
- Specified by:
findByUidin classBaseRestService<TicketAttachmentEntity,TicketAttachmentRequest, TicketAttachmentResponse>
-
handleOptimisticLockingFailureException
public TicketAttachmentEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, TicketAttachmentEntity entity) -
save
Description copied from class:BaseRestService保存实体,带重试机制- Overrides:
savein classBaseRestService<TicketAttachmentEntity,TicketAttachmentRequest, TicketAttachmentResponse>
-
doSave
Description copied from class:BaseRestService子类实现具体的保存逻辑- Specified by:
doSavein classBaseRestService<TicketAttachmentEntity,TicketAttachmentRequest, TicketAttachmentResponse>
-
convertToResponse
- Specified by:
convertToResponsein classBaseRestService<TicketAttachmentEntity,TicketAttachmentRequest, TicketAttachmentResponse>
-
createSpecification
protected org.springframework.data.jpa.domain.Specification<TicketAttachmentEntity> createSpecification(TicketAttachmentRequest request) Description copied from class:BaseRestService创建Specification对象,子类必须实现 用于queryByOrg的通用实现- Specified by:
createSpecificationin classBaseRestService<TicketAttachmentEntity,TicketAttachmentRequest, TicketAttachmentResponse>
-
executePageQuery
protected org.springframework.data.domain.Page<TicketAttachmentEntity> executePageQuery(org.springframework.data.jpa.domain.Specification<TicketAttachmentEntity> specification, org.springframework.data.domain.Pageable pageable) Description copied from class:BaseRestService执行分页查询,子类必须实现 用于queryByOrg的通用实现- Specified by:
executePageQueryin classBaseRestService<TicketAttachmentEntity,TicketAttachmentRequest, TicketAttachmentResponse>
-