Package com.bytedesk.wechat.mp.black
Class WeChatMpBlackRestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest,WeChatMpBlackResponse>
com.bytedesk.wechat.mp.black.WeChatMpBlackRestService
@Service
public class WeChatMpBlackRestService
extends BaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest,WeChatMpBlackResponse>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AuthServiceprivate final org.modelmapper.ModelMapperprivate final UidUtilsprivate final WeChatMpBlackRepository -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToResponse(WeChatMpBlackEntity entity) create(WeChatMpBlackRequest request) protected org.springframework.data.jpa.domain.Specification<WeChatMpBlackEntity>createSpecification(WeChatMpBlackRequest request) 创建Specification对象,子类必须实现 用于queryByOrg的通用实现voiddelete(WeChatMpBlackRequest entity) voiddeleteByUid(String uid) protected WeChatMpBlackEntitydoSave(WeChatMpBlackEntity entity) 子类实现具体的保存逻辑protected org.springframework.data.domain.Page<WeChatMpBlackEntity>executePageQuery(org.springframework.data.jpa.domain.Specification<WeChatMpBlackEntity> specification, org.springframework.data.domain.Pageable pageable) 执行分页查询,子类必须实现 用于queryByOrg的通用实现handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, WeChatMpBlackEntity entity) org.springframework.data.domain.Page<WeChatMpBlackResponse>queryByOrg(WeChatMpBlackRequest request) 通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法queryByUid(WeChatMpBlackRequest request) 通用的queryByUid实现org.springframework.data.domain.Page<WeChatMpBlackResponse>queryByUser(WeChatMpBlackRequest request) 通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法save(WeChatMpBlackEntity entity) 保存实体,带重试机制update(WeChatMpBlackRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestService
deleteByOrgUid, findByOrgUid, getUidFromRequest, recover, setUserUidToRequest
-
Field Details
-
weChatMpBlackRepository
-
modelMapper
private final org.modelmapper.ModelMapper modelMapper -
uidUtils
-
authService
-
-
Constructor Details
-
WeChatMpBlackRestService
public WeChatMpBlackRestService()
-
-
Method Details
-
queryByOrg
public org.springframework.data.domain.Page<WeChatMpBlackResponse> queryByOrg(WeChatMpBlackRequest request) Description copied from class:BaseRestService通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByOrgin classBaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest, WeChatMpBlackResponse>
-
queryByUser
public org.springframework.data.domain.Page<WeChatMpBlackResponse> queryByUser(WeChatMpBlackRequest request) Description copied from class:BaseRestService通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByUserin classBaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest, WeChatMpBlackResponse>
-
findByUid
@Cacheable(value="wechatmpBlack", key="#uid") public Optional<WeChatMpBlackEntity> findByUid(String uid) - Specified by:
findByUidin classBaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest, WeChatMpBlackResponse>
-
create
- Specified by:
createin classBaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest, WeChatMpBlackResponse>
-
update
- Specified by:
updatein classBaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest, WeChatMpBlackResponse>
-
save
@CachePut(value="wechatmpBlack", key="#entity.uid") public WeChatMpBlackEntity save(WeChatMpBlackEntity entity) Description copied from class:BaseRestService保存实体,带重试机制- Overrides:
savein classBaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest, WeChatMpBlackResponse>
-
doSave
Description copied from class:BaseRestService子类实现具体的保存逻辑- Specified by:
doSavein classBaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest, WeChatMpBlackResponse>
-
deleteByUid
- Specified by:
deleteByUidin classBaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest, WeChatMpBlackResponse>
-
delete
@CacheEvict(value="wechatmpBlack", key="#entity.uid") public void delete(WeChatMpBlackRequest entity) - Specified by:
deletein classBaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest, WeChatMpBlackResponse>
-
handleOptimisticLockingFailureException
public WeChatMpBlackEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, WeChatMpBlackEntity entity) -
convertToResponse
- Specified by:
convertToResponsein classBaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest, WeChatMpBlackResponse>
-
queryByUid
Description copied from class:BaseRestService通用的queryByUid实现- Overrides:
queryByUidin classBaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest, WeChatMpBlackResponse>
-
createSpecification
protected org.springframework.data.jpa.domain.Specification<WeChatMpBlackEntity> createSpecification(WeChatMpBlackRequest request) Description copied from class:BaseRestService创建Specification对象,子类必须实现 用于queryByOrg的通用实现- Specified by:
createSpecificationin classBaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest, WeChatMpBlackResponse>
-
executePageQuery
protected org.springframework.data.domain.Page<WeChatMpBlackEntity> executePageQuery(org.springframework.data.jpa.domain.Specification<WeChatMpBlackEntity> specification, org.springframework.data.domain.Pageable pageable) Description copied from class:BaseRestService执行分页查询,子类必须实现 用于queryByOrg的通用实现- Specified by:
executePageQueryin classBaseRestService<WeChatMpBlackEntity,WeChatMpBlackRequest, WeChatMpBlackResponse>
-