Package com.bytedesk.wechat.mp.tag
Class WeChatMpTagRestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<WeChatMpTagEntity,WeChatMpTagRequest,WeChatMpTagResponse>
com.bytedesk.wechat.mp.tag.WeChatMpTagRestService
@Service
public class WeChatMpTagRestService
extends BaseRestService<WeChatMpTagEntity,WeChatMpTagRequest,WeChatMpTagResponse>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AuthService
private final org.modelmapper.ModelMapper
private final UidUtils
private final WeChatMpTagRepository
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToResponse
(WeChatMpTagEntity entity) create
(WeChatMpTagRequest request) protected org.springframework.data.jpa.domain.Specification<WeChatMpTagEntity>
createSpecification
(WeChatMpTagRequest request) 创建Specification对象,子类必须实现 用于queryByOrg的通用实现void
delete
(WeChatMpTagRequest entity) void
deleteByUid
(String uid) protected WeChatMpTagEntity
doSave
(WeChatMpTagEntity entity) 子类实现具体的保存逻辑protected org.springframework.data.domain.Page<WeChatMpTagEntity>
executePageQuery
(org.springframework.data.jpa.domain.Specification<WeChatMpTagEntity> specification, org.springframework.data.domain.Pageable pageable) 执行分页查询,子类必须实现 用于queryByOrg的通用实现handleOptimisticLockingFailureException
(org.springframework.orm.ObjectOptimisticLockingFailureException e, WeChatMpTagEntity entity) org.springframework.data.domain.Page<WeChatMpTagResponse>
queryByOrg
(WeChatMpTagRequest request) 通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法queryByUid
(WeChatMpTagRequest request) 通用的queryByUid实现org.springframework.data.domain.Page<WeChatMpTagResponse>
queryByUser
(WeChatMpTagRequest request) 通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法save
(WeChatMpTagEntity entity) 保存实体,带重试机制update
(WeChatMpTagRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestService
deleteByOrgUid, findByOrgUid, getUidFromRequest, recover, setUserUidToRequest
-
Field Details
-
weChatMpTagRepository
-
modelMapper
private final org.modelmapper.ModelMapper modelMapper -
uidUtils
-
authService
-
-
Constructor Details
-
WeChatMpTagRestService
public WeChatMpTagRestService()
-
-
Method Details
-
queryByOrg
public org.springframework.data.domain.Page<WeChatMpTagResponse> queryByOrg(WeChatMpTagRequest request) Description copied from class:BaseRestService
通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByOrg
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-
queryByUser
public org.springframework.data.domain.Page<WeChatMpTagResponse> queryByUser(WeChatMpTagRequest request) Description copied from class:BaseRestService
通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByUser
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-
findByUid
@Cacheable(value="wechatmptag", key="#uid") public Optional<WeChatMpTagEntity> findByUid(String uid) - Specified by:
findByUid
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-
create
- Specified by:
create
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-
update
- Specified by:
update
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-
save
@CachePut(value="wechatmptag", key="#entity.uid") public WeChatMpTagEntity save(WeChatMpTagEntity entity) Description copied from class:BaseRestService
保存实体,带重试机制- Overrides:
save
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-
doSave
Description copied from class:BaseRestService
子类实现具体的保存逻辑- Specified by:
doSave
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-
deleteByUid
- Specified by:
deleteByUid
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-
delete
- Specified by:
delete
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-
handleOptimisticLockingFailureException
public WeChatMpTagEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, WeChatMpTagEntity entity) - Specified by:
handleOptimisticLockingFailureException
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-
convertToResponse
- Specified by:
convertToResponse
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-
queryByUid
Description copied from class:BaseRestService
通用的queryByUid实现- Overrides:
queryByUid
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-
createSpecification
protected org.springframework.data.jpa.domain.Specification<WeChatMpTagEntity> createSpecification(WeChatMpTagRequest request) Description copied from class:BaseRestService
创建Specification对象,子类必须实现 用于queryByOrg的通用实现- Specified by:
createSpecification
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-
executePageQuery
protected org.springframework.data.domain.Page<WeChatMpTagEntity> executePageQuery(org.springframework.data.jpa.domain.Specification<WeChatMpTagEntity> specification, org.springframework.data.domain.Pageable pageable) Description copied from class:BaseRestService
执行分页查询,子类必须实现 用于queryByOrg的通用实现- Specified by:
executePageQuery
in classBaseRestService<WeChatMpTagEntity,
WeChatMpTagRequest, WeChatMpTagResponse>
-