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的通用实现void
delete
(TicketAttachmentRequest request) void
deleteByUid
(String uid) protected TicketAttachmentEntity
doSave
(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:
queryByOrg
in classBaseRestService<TicketAttachmentEntity,
TicketAttachmentRequest, TicketAttachmentResponse>
-
queryByUser
public org.springframework.data.domain.Page<TicketAttachmentResponse> queryByUser(TicketAttachmentRequest request) Description copied from class:BaseRestService
通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByUser
in classBaseRestService<TicketAttachmentEntity,
TicketAttachmentRequest, TicketAttachmentResponse>
-
create
- Specified by:
create
in classBaseRestService<TicketAttachmentEntity,
TicketAttachmentRequest, TicketAttachmentResponse>
-
update
- Specified by:
update
in classBaseRestService<TicketAttachmentEntity,
TicketAttachmentRequest, TicketAttachmentResponse>
-
delete
- Specified by:
delete
in classBaseRestService<TicketAttachmentEntity,
TicketAttachmentRequest, TicketAttachmentResponse>
-
deleteByUid
- Specified by:
deleteByUid
in classBaseRestService<TicketAttachmentEntity,
TicketAttachmentRequest, TicketAttachmentResponse>
-
findByUid
- Specified by:
findByUid
in classBaseRestService<TicketAttachmentEntity,
TicketAttachmentRequest, TicketAttachmentResponse>
-
handleOptimisticLockingFailureException
public TicketAttachmentEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, TicketAttachmentEntity entity) -
save
Description copied from class:BaseRestService
保存实体,带重试机制- Overrides:
save
in classBaseRestService<TicketAttachmentEntity,
TicketAttachmentRequest, TicketAttachmentResponse>
-
doSave
Description copied from class:BaseRestService
子类实现具体的保存逻辑- Specified by:
doSave
in classBaseRestService<TicketAttachmentEntity,
TicketAttachmentRequest, TicketAttachmentResponse>
-
convertToResponse
- Specified by:
convertToResponse
in 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:
createSpecification
in 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:
executePageQuery
in classBaseRestService<TicketAttachmentEntity,
TicketAttachmentRequest, TicketAttachmentResponse>
-