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 AuthServiceprivate final org.modelmapper.ModelMapperprivate final UidUtilsprivate 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的通用实现voiddelete(WeChatMpTagRequest entity) voiddeleteByUid(String uid) protected WeChatMpTagEntitydoSave(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:
queryByOrgin classBaseRestService<WeChatMpTagEntity,WeChatMpTagRequest, WeChatMpTagResponse>
-
queryByUser
public org.springframework.data.domain.Page<WeChatMpTagResponse> queryByUser(WeChatMpTagRequest request) Description copied from class:BaseRestService通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByUserin classBaseRestService<WeChatMpTagEntity,WeChatMpTagRequest, WeChatMpTagResponse>
-
findByUid
@Cacheable(value="wechatmptag", key="#uid") public Optional<WeChatMpTagEntity> findByUid(String uid) - Specified by:
findByUidin classBaseRestService<WeChatMpTagEntity,WeChatMpTagRequest, WeChatMpTagResponse>
-
create
- Specified by:
createin classBaseRestService<WeChatMpTagEntity,WeChatMpTagRequest, WeChatMpTagResponse>
-
update
- Specified by:
updatein classBaseRestService<WeChatMpTagEntity,WeChatMpTagRequest, WeChatMpTagResponse>
-
save
@CachePut(value="wechatmptag", key="#entity.uid") public WeChatMpTagEntity save(WeChatMpTagEntity entity) Description copied from class:BaseRestService保存实体,带重试机制- Overrides:
savein classBaseRestService<WeChatMpTagEntity,WeChatMpTagRequest, WeChatMpTagResponse>
-
doSave
Description copied from class:BaseRestService子类实现具体的保存逻辑- Specified by:
doSavein classBaseRestService<WeChatMpTagEntity,WeChatMpTagRequest, WeChatMpTagResponse>
-
deleteByUid
- Specified by:
deleteByUidin classBaseRestService<WeChatMpTagEntity,WeChatMpTagRequest, WeChatMpTagResponse>
-
delete
- Specified by:
deletein classBaseRestService<WeChatMpTagEntity,WeChatMpTagRequest, WeChatMpTagResponse>
-
handleOptimisticLockingFailureException
public WeChatMpTagEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, WeChatMpTagEntity entity) - Specified by:
handleOptimisticLockingFailureExceptionin classBaseRestService<WeChatMpTagEntity,WeChatMpTagRequest, WeChatMpTagResponse>
-
convertToResponse
- Specified by:
convertToResponsein classBaseRestService<WeChatMpTagEntity,WeChatMpTagRequest, WeChatMpTagResponse>
-
queryByUid
Description copied from class:BaseRestService通用的queryByUid实现- Overrides:
queryByUidin 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:
createSpecificationin 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:
executePageQueryin classBaseRestService<WeChatMpTagEntity,WeChatMpTagRequest, WeChatMpTagResponse>
-