Package com.bytedesk.service.channel_app
Class ChannelAppRestService
java.lang.Object
com.bytedesk.core.base.BaseRestService<T,TRequest,TResponse>
com.bytedesk.core.base.BaseRestServiceWithExcel<ChannelAppEntity,ChannelAppRequest,ChannelAppResponse,ChannelAppExcel>
com.bytedesk.service.channel_app.ChannelAppRestService
@Service
public class ChannelAppRestService
extends BaseRestServiceWithExcel<ChannelAppEntity,ChannelAppRequest,ChannelAppResponse,ChannelAppExcel>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ChannelAppRepository
private final AuthService
private final org.modelmapper.ModelMapper
private final UidUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToExcel
(ChannelAppEntity entity) convertToResponse
(ChannelAppEntity entity) create
(ChannelAppRequest request) void
delete
(ChannelAppRequest request) void
deleteByUid
(String uid) protected ChannelAppEntity
doSave
(ChannelAppEntity entity) existsByUid
(String uid) handleOptimisticLockingFailureException
(org.springframework.orm.ObjectOptimisticLockingFailureException e, ChannelAppEntity entity) org.springframework.data.domain.Page<ChannelAppResponse>
queryByOrg
(ChannelAppRequest request) org.springframework.data.domain.Page<ChannelAppEntity>
queryByOrgEntity
(ChannelAppRequest request) queryByUid
(ChannelAppRequest request) org.springframework.data.domain.Page<ChannelAppResponse>
queryByUser
(ChannelAppRequest request) update
(ChannelAppRequest request) Methods inherited from class com.bytedesk.core.base.BaseRestService
getUidFromRequest, recover, save
-
Field Details
-
appRepository
-
modelMapper
private final org.modelmapper.ModelMapper modelMapper -
uidUtils
-
authService
-
-
Constructor Details
-
ChannelAppRestService
public ChannelAppRestService()
-
-
Method Details
-
queryByOrgEntity
public org.springframework.data.domain.Page<ChannelAppEntity> queryByOrgEntity(ChannelAppRequest request) - Specified by:
queryByOrgEntity
in classBaseRestServiceWithExcel<ChannelAppEntity,
ChannelAppRequest, ChannelAppResponse, ChannelAppExcel>
-
queryByOrg
public org.springframework.data.domain.Page<ChannelAppResponse> queryByOrg(ChannelAppRequest request) - Specified by:
queryByOrg
in classBaseRestService<ChannelAppEntity,
ChannelAppRequest, ChannelAppResponse>
-
queryByUser
public org.springframework.data.domain.Page<ChannelAppResponse> queryByUser(ChannelAppRequest request) - Specified by:
queryByUser
in classBaseRestService<ChannelAppEntity,
ChannelAppRequest, ChannelAppResponse>
-
queryByUid
- Overrides:
queryByUid
in classBaseRestService<ChannelAppEntity,
ChannelAppRequest, ChannelAppResponse>
-
findByUid
@Cacheable(value="app", key="#uid", unless="#result==null") public Optional<ChannelAppEntity> findByUid(String uid) - Specified by:
findByUid
in classBaseRestService<ChannelAppEntity,
ChannelAppRequest, ChannelAppResponse>
-
existsByUid
-
create
- Specified by:
create
in classBaseRestService<ChannelAppEntity,
ChannelAppRequest, ChannelAppResponse>
-
update
- Specified by:
update
in classBaseRestService<ChannelAppEntity,
ChannelAppRequest, ChannelAppResponse>
-
doSave
- Specified by:
doSave
in classBaseRestService<ChannelAppEntity,
ChannelAppRequest, ChannelAppResponse>
-
handleOptimisticLockingFailureException
public ChannelAppEntity handleOptimisticLockingFailureException(org.springframework.orm.ObjectOptimisticLockingFailureException e, ChannelAppEntity entity) - Specified by:
handleOptimisticLockingFailureException
in classBaseRestService<ChannelAppEntity,
ChannelAppRequest, ChannelAppResponse>
-
deleteByUid
- Specified by:
deleteByUid
in classBaseRestService<ChannelAppEntity,
ChannelAppRequest, ChannelAppResponse>
-
delete
- Specified by:
delete
in classBaseRestService<ChannelAppEntity,
ChannelAppRequest, ChannelAppResponse>
-
convertToResponse
- Specified by:
convertToResponse
in classBaseRestService<ChannelAppEntity,
ChannelAppRequest, ChannelAppResponse>
-
convertToExcel
- Specified by:
convertToExcel
in classBaseRestServiceWithExcel<ChannelAppEntity,
ChannelAppRequest, ChannelAppResponse, ChannelAppExcel>
-