Class WeChatAccountRestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<WeChatAccountEntity,WeChatAccountRequest,WeChatAccountResponse>
com.bytedesk.wechat.work.kefu.account.WeChatAccountRestService
@Service
public class WeChatAccountRestService
extends BaseRestService<WeChatAccountEntity,WeChatAccountRequest,WeChatAccountResponse>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.modelmapper.ModelMapperprivate final WeChatAccountRepositoryFields inherited from class com.bytedesk.core.base.BaseRestService
authService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToResponse(WeChatAccountEntity entity) create(WeChatAccountRequest request) protected org.springframework.data.jpa.domain.Specification<WeChatAccountEntity>createSpecification(WeChatAccountRequest request) 创建Specification对象,子类必须实现 用于queryByOrg的通用实现voiddelete(WeChatAccountRequest entity) voiddeleteByUid(String uid) protected WeChatAccountEntitydoSave(WeChatAccountEntity entity) 子类实现具体的保存逻辑protected org.springframework.data.domain.Page<WeChatAccountEntity>executePageQuery(org.springframework.data.jpa.domain.Specification<WeChatAccountEntity> specification, org.springframework.data.domain.Pageable pageable) 执行分页查询,子类必须实现 用于queryByOrg的通用实现handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, WeChatAccountEntity entity) org.springframework.data.domain.Page<WeChatAccountResponse>queryByOrg(WeChatAccountRequest request) 通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法queryByUid(WeChatAccountRequest request) 通用的queryByUid实现org.springframework.data.domain.Page<WeChatAccountResponse>queryByUser(WeChatAccountRequest request) 通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法update(WeChatAccountRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestService
deleteByOrgUid, findByOrgUid, getUidFromRequest, recover, save, setUserUidToRequest
-
Field Details
-
weChatAccountRepository
-
modelMapper
private final org.modelmapper.ModelMapper modelMapper
-
-
Constructor Details
-
WeChatAccountRestService
public WeChatAccountRestService()
-
-
Method Details
-
queryByOrg
public org.springframework.data.domain.Page<WeChatAccountResponse> queryByOrg(WeChatAccountRequest request) Description copied from class:BaseRestService通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByOrgin classBaseRestService<WeChatAccountEntity,WeChatAccountRequest, WeChatAccountResponse>
-
queryByUser
public org.springframework.data.domain.Page<WeChatAccountResponse> queryByUser(WeChatAccountRequest request) Description copied from class:BaseRestService通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法- Overrides:
queryByUserin classBaseRestService<WeChatAccountEntity,WeChatAccountRequest, WeChatAccountResponse>
-
findByUid
- Specified by:
findByUidin classBaseRestService<WeChatAccountEntity,WeChatAccountRequest, WeChatAccountResponse>
-
create
- Specified by:
createin classBaseRestService<WeChatAccountEntity,WeChatAccountRequest, WeChatAccountResponse>
-
update
- Specified by:
updatein classBaseRestService<WeChatAccountEntity,WeChatAccountRequest, WeChatAccountResponse>
-
doSave
Description copied from class:BaseRestService子类实现具体的保存逻辑- Specified by:
doSavein classBaseRestService<WeChatAccountEntity,WeChatAccountRequest, WeChatAccountResponse>
-
deleteByUid
- Specified by:
deleteByUidin classBaseRestService<WeChatAccountEntity,WeChatAccountRequest, WeChatAccountResponse>
-
delete
- Specified by:
deletein classBaseRestService<WeChatAccountEntity,WeChatAccountRequest, WeChatAccountResponse>
-
handleOptimisticLockingFailureException
public WeChatAccountEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, WeChatAccountEntity entity) -
convertToResponse
- Specified by:
convertToResponsein classBaseRestService<WeChatAccountEntity,WeChatAccountRequest, WeChatAccountResponse>
-
queryByUid
Description copied from class:BaseRestService通用的queryByUid实现- Overrides:
queryByUidin classBaseRestService<WeChatAccountEntity,WeChatAccountRequest, WeChatAccountResponse>
-
createSpecification
protected org.springframework.data.jpa.domain.Specification<WeChatAccountEntity> createSpecification(WeChatAccountRequest request) Description copied from class:BaseRestService创建Specification对象,子类必须实现 用于queryByOrg的通用实现- Specified by:
createSpecificationin classBaseRestService<WeChatAccountEntity,WeChatAccountRequest, WeChatAccountResponse>
-
executePageQuery
protected org.springframework.data.domain.Page<WeChatAccountEntity> executePageQuery(org.springframework.data.jpa.domain.Specification<WeChatAccountEntity> specification, org.springframework.data.domain.Pageable pageable) Description copied from class:BaseRestService执行分页查询,子类必须实现 用于queryByOrg的通用实现- Specified by:
executePageQueryin classBaseRestService<WeChatAccountEntity,WeChatAccountRequest, WeChatAccountResponse>
-