Class WebhookMessageRestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<T,TRequest,TResponse>
com.bytedesk.core.base.BaseRestServiceWithExport<WebhookMessageEntity,WebhookMessageRequest,WebhookMessageResponse,WebhookMessageExcel>
com.bytedesk.core.webhook_message.WebhookMessageRestService
@Service
public class WebhookMessageRestService
extends BaseRestServiceWithExport<WebhookMessageEntity,WebhookMessageRequest,WebhookMessageResponse,WebhookMessageExcel>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.modelmapper.ModelMapperprivate final UidUtilsprivate final WebhookMessageRepositoryFields inherited from class com.bytedesk.core.base.BaseRestService
authService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToExcel(WebhookMessageEntity entity) 转换为Excel对象 子类必须实现此方法create(WebhookMessageRequest request) protected org.springframework.data.jpa.domain.Specification<WebhookMessageEntity>createSpecification(WebhookMessageRequest request) 创建Specification对象,子类必须实现 用于queryByOrg的通用实现voiddelete(WebhookMessageRequest request) voiddeleteByUid(String uid) protected WebhookMessageEntitydoSave(WebhookMessageEntity entity) 子类实现具体的保存逻辑protected org.springframework.data.domain.Page<WebhookMessageEntity>executePageQuery(org.springframework.data.jpa.domain.Specification<WebhookMessageEntity> spec, org.springframework.data.domain.Pageable pageable) 执行分页查询,子类必须实现 用于queryByOrg的通用实现existsByUid(String uid) handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, WebhookMessageEntity entity) update(WebhookMessageRequest 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
-
webhookRepository
-
modelMapper
private final org.modelmapper.ModelMapper modelMapper -
uidUtils
-
-
Constructor Details
-
WebhookMessageRestService
public WebhookMessageRestService()
-
-
Method Details
-
createSpecification
protected org.springframework.data.jpa.domain.Specification<WebhookMessageEntity> createSpecification(WebhookMessageRequest request) Description copied from class:BaseRestService创建Specification对象,子类必须实现 用于queryByOrg的通用实现- Specified by:
createSpecificationin classBaseRestService<WebhookMessageEntity,WebhookMessageRequest, WebhookMessageResponse>
-
executePageQuery
protected org.springframework.data.domain.Page<WebhookMessageEntity> executePageQuery(org.springframework.data.jpa.domain.Specification<WebhookMessageEntity> spec, org.springframework.data.domain.Pageable pageable) Description copied from class:BaseRestService执行分页查询,子类必须实现 用于queryByOrg的通用实现- Specified by:
executePageQueryin classBaseRestService<WebhookMessageEntity,WebhookMessageRequest, WebhookMessageResponse>
-
findByUid
@Cacheable(value="webhook", key="#uid", unless="#result==null") public Optional<WebhookMessageEntity> findByUid(String uid) - Specified by:
findByUidin classBaseRestService<WebhookMessageEntity,WebhookMessageRequest, WebhookMessageResponse>
-
existsByUid
-
create
- Specified by:
createin classBaseRestService<WebhookMessageEntity,WebhookMessageRequest, WebhookMessageResponse>
-
update
- Specified by:
updatein classBaseRestService<WebhookMessageEntity,WebhookMessageRequest, WebhookMessageResponse>
-
doSave
Description copied from class:BaseRestService子类实现具体的保存逻辑- Specified by:
doSavein classBaseRestService<WebhookMessageEntity,WebhookMessageRequest, WebhookMessageResponse>
-
handleOptimisticLockingFailureException
public WebhookMessageEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, WebhookMessageEntity entity) -
deleteByUid
- Specified by:
deleteByUidin classBaseRestService<WebhookMessageEntity,WebhookMessageRequest, WebhookMessageResponse>
-
delete
- Specified by:
deletein classBaseRestService<WebhookMessageEntity,WebhookMessageRequest, WebhookMessageResponse>
-
convertToResponse
- Specified by:
convertToResponsein classBaseRestService<WebhookMessageEntity,WebhookMessageRequest, WebhookMessageResponse>
-
convertToExcel
Description copied from class:BaseRestServiceWithExport转换为Excel对象 子类必须实现此方法
-