Package com.bytedesk.wechat.mp
Class WeChatMpService
java.lang.Object
com.bytedesk.core.base.BaseRestService<WeChatMpEntity,WeChatMpRequest,WeChatMpResponse>
com.bytedesk.wechat.mp.WeChatMpService
@Service
public class WeChatMpService
extends BaseRestService<WeChatMpEntity,WeChatMpRequest,WeChatMpResponse>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AuthService
private org.modelmapper.ModelMapper
private UidUtils
private final WeChatMpRepository
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToResponse
(WeChatMpEntity entity) create
(WeChatMpRequest request) void
delete
(WeChatMpRequest entity) void
deleteByUid
(String uid) findAll()
findByToken
(String token) void
handleOptimisticLockingFailureException
(org.springframework.orm.ObjectOptimisticLockingFailureException e, WeChatMpEntity entity) org.springframework.data.domain.Page<WeChatMpResponse>
queryByOrg
(WeChatMpRequest request) queryByUid
(WeChatMpRequest request) org.springframework.data.domain.Page<WeChatMpResponse>
queryByUser
(WeChatMpRequest request) save
(WeChatMpEntity entity) update
(WeChatMpRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestService
getUidFromRequest
-
Field Details
-
weChatMpRepository
-
modelMapper
private org.modelmapper.ModelMapper modelMapper -
uidUtils
-
authService
-
-
Constructor Details
-
WeChatMpService
public WeChatMpService()
-
-
Method Details
-
queryByOrg
- Specified by:
queryByOrg
in classBaseRestService<WeChatMpEntity,
WeChatMpRequest, WeChatMpResponse>
-
queryByUser
- Specified by:
queryByUser
in classBaseRestService<WeChatMpEntity,
WeChatMpRequest, WeChatMpResponse>
-
findByUid
@Cacheable(value="wechatmp", key="#uid", unless="#result == null") public Optional<WeChatMpEntity> findByUid(String uid) - Specified by:
findByUid
in classBaseRestService<WeChatMpEntity,
WeChatMpRequest, WeChatMpResponse>
-
findByToken
@Cacheable(value="wechatmp", key="#token", unless="#result == null") public Optional<WeChatMpEntity> findByToken(String token) -
findAll
-
create
- Specified by:
create
in classBaseRestService<WeChatMpEntity,
WeChatMpRequest, WeChatMpResponse>
-
update
- Specified by:
update
in classBaseRestService<WeChatMpEntity,
WeChatMpRequest, WeChatMpResponse>
-
save
- Specified by:
save
in classBaseRestService<WeChatMpEntity,
WeChatMpRequest, WeChatMpResponse>
-
deleteByUid
- Specified by:
deleteByUid
in classBaseRestService<WeChatMpEntity,
WeChatMpRequest, WeChatMpResponse>
-
delete
- Specified by:
delete
in classBaseRestService<WeChatMpEntity,
WeChatMpRequest, WeChatMpResponse>
-
handleOptimisticLockingFailureException
public void handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, WeChatMpEntity entity) - Specified by:
handleOptimisticLockingFailureException
in classBaseRestService<WeChatMpEntity,
WeChatMpRequest, WeChatMpResponse>
-
convertToResponse
- Specified by:
convertToResponse
in classBaseRestService<WeChatMpEntity,
WeChatMpRequest, WeChatMpResponse>
-
queryByUid
- Overrides:
queryByUid
in classBaseRestService<WeChatMpEntity,
WeChatMpRequest, WeChatMpResponse>
-