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