Package com.bytedesk.social.kakao
Class KakaoRestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<T,TRequest,TResponse>
  
com.bytedesk.core.base.BaseRestServiceWithExport<KakaoEntity,KakaoRequest,KakaoResponse,KakaoExcel>
   
com.bytedesk.social.kakao.KakaoRestService
@Service
public class KakaoRestService
extends BaseRestServiceWithExport<KakaoEntity,KakaoRequest,KakaoResponse,KakaoExcel>   
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final org.modelmapper.ModelMapperprivate final KakaoRepositoryprivate final UidUtilsFields inherited from class com.bytedesk.core.base.BaseRestServiceauthService
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionconvertToExcel(KakaoEntity entity) 转换为Excel对象 子类必须实现此方法convertToResponse(KakaoEntity entity) create(KakaoRequest request) protected org.springframework.data.jpa.domain.Specification<KakaoEntity>createSpecification(KakaoRequest request) 创建Specification对象,子类必须实现 用于queryByOrg的通用实现voiddelete(KakaoRequest request) voiddeleteByUid(String uid) protected KakaoEntitydoSave(KakaoEntity entity) 子类实现具体的保存逻辑protected org.springframework.data.domain.Page<KakaoEntity>executePageQuery(org.springframework.data.jpa.domain.Specification<KakaoEntity> spec, org.springframework.data.domain.Pageable pageable) 执行分页查询,子类必须实现 用于queryByOrg的通用实现existsByUid(String uid) findAll()handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, KakaoEntity entity) org.springframework.data.domain.Page<KakaoResponse>queryByOrg(KakaoRequest request) 通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法org.springframework.data.domain.Page<KakaoEntity>queryByOrgEntity(KakaoRequest request) 查询实体对象(用于Excel导出) 子类必须实现此方法queryByUid(KakaoRequest request) 通用的queryByUid实现org.springframework.data.domain.Page<KakaoResponse>queryByUser(KakaoRequest request) 通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法voidrefreshAccessToken(KakaoRequest request) private voidrefreshKefuAccessToken(KakaoRequest request) private voidrefreshMiniAccessToken(KakaoRequest request) private voidrefreshMpAccessToken(KakaoRequest request) private voidrefreshWorkAccessToken(KakaoEntity kakaoEntity) update(KakaoRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestServicedeleteByOrgUid, findByOrgUid, getUidFromRequest, recover, save, setUserUidToRequest
- 
Field Details
- 
modelMapperprivate final org.modelmapper.ModelMapper modelMapper
- 
uidUtils
 
- 
Constructor Details- 
KakaoRestServicepublic KakaoRestService()
 
- 
- 
Method Details- 
createSpecificationprotected org.springframework.data.jpa.domain.Specification<KakaoEntity> createSpecification(KakaoRequest request) Description copied from class:BaseRestService创建Specification对象,子类必须实现 用于queryByOrg的通用实现- Specified by:
- createSpecificationin class- BaseRestService<KakaoEntity,- KakaoRequest, - KakaoResponse> 
 
- 
executePageQueryprotected org.springframework.data.domain.Page<KakaoEntity> executePageQuery(org.springframework.data.jpa.domain.Specification<KakaoEntity> spec, org.springframework.data.domain.Pageable pageable) Description copied from class:BaseRestService执行分页查询,子类必须实现 用于queryByOrg的通用实现- Specified by:
- executePageQueryin class- BaseRestService<KakaoEntity,- KakaoRequest, - KakaoResponse> 
 
- 
queryByOrgEntityDescription copied from class:BaseRestServiceWithExport查询实体对象(用于Excel导出) 子类必须实现此方法- Overrides:
- queryByOrgEntityin class- BaseRestServiceWithExport<KakaoEntity,- KakaoRequest, - KakaoResponse, - KakaoExcel> 
 
- 
queryByOrgDescription copied from class:BaseRestService通用的queryByOrg实现 子类如果有特殊逻辑可以重写此方法- Overrides:
- queryByOrgin class- BaseRestService<KakaoEntity,- KakaoRequest, - KakaoResponse> 
 
- 
queryByUserDescription copied from class:BaseRestService通用的queryByUser实现 子类如果有特殊逻辑可以重写此方法- Overrides:
- queryByUserin class- BaseRestService<KakaoEntity,- KakaoRequest, - KakaoResponse> 
 
- 
queryByUidDescription copied from class:BaseRestService通用的queryByUid实现- Overrides:
- queryByUidin class- BaseRestService<KakaoEntity,- KakaoRequest, - KakaoResponse> 
 
- 
findByUid@Cacheable(value="app", key="#uid", unless="#result==null") public Optional<KakaoEntity> findByUid(String uid) - Specified by:
- findByUidin class- BaseRestService<KakaoEntity,- KakaoRequest, - KakaoResponse> 
 
- 
findAll
- 
existsByUid
- 
create- Specified by:
- createin class- BaseRestService<KakaoEntity,- KakaoRequest, - KakaoResponse> 
 
- 
update- Specified by:
- updatein class- BaseRestService<KakaoEntity,- KakaoRequest, - KakaoResponse> 
 
- 
doSaveDescription copied from class:BaseRestService子类实现具体的保存逻辑- Specified by:
- doSavein class- BaseRestService<KakaoEntity,- KakaoRequest, - KakaoResponse> 
 
- 
handleOptimisticLockingFailureExceptionpublic KakaoEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, KakaoEntity entity) - Specified by:
- handleOptimisticLockingFailureExceptionin class- BaseRestService<KakaoEntity,- KakaoRequest, - KakaoResponse> 
 
- 
deleteByUid- Specified by:
- deleteByUidin class- BaseRestService<KakaoEntity,- KakaoRequest, - KakaoResponse> 
 
- 
delete- Specified by:
- deletein class- BaseRestService<KakaoEntity,- KakaoRequest, - KakaoResponse> 
 
- 
refreshAccessToken
- 
refreshWorkAccessToken
- 
refreshMpAccessToken
- 
refreshMiniAccessToken
- 
refreshKefuAccessToken
- 
convertToResponse- Specified by:
- convertToResponsein class- BaseRestService<KakaoEntity,- KakaoRequest, - KakaoResponse> 
 
- 
convertToExcelDescription copied from class:BaseRestServiceWithExport转换为Excel对象 子类必须实现此方法- Specified by:
- convertToExcelin class- BaseRestServiceWithExport<KakaoEntity,- KakaoRequest, - KakaoResponse, - KakaoExcel> 
 
 
- 
socialAppRepository