mirror of
https://gitee.com/270580156/weiyu.git
synced 2025-12-30 10:52:26 +00:00
update
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2024-05-11 18:14:28
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2025-06-14 10:14:10
|
||||
* @LastEditTime: 2025-06-26 17:38:01
|
||||
* @Description: bytedesk.com https://github.com/Bytedesk/bytedesk
|
||||
* Please be aware of the BSL license restrictions before installing Bytedesk IM –
|
||||
* selling, reselling, or hosting Bytedesk IM as a service is a breach of the terms and automatically terminates your rights under the license.
|
||||
@@ -41,9 +41,9 @@ import java.util.List;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
// @EntityListeners({FreeswitchWebRTCEntityListener.class})
|
||||
// @EntityListeners({FreeSwitchWebRTCEntityListener.class})
|
||||
@Table(name = "bytedesk_freeswitch_webrtc")
|
||||
public class FreeswitchWebRTCEntity extends BaseEntity {
|
||||
public class FreeSwitchWebRTCEntity extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 客服名称
|
||||
@@ -65,7 +65,7 @@ public class FreeswitchWebRTCEntity extends BaseEntity {
|
||||
*/
|
||||
@Builder.Default
|
||||
@Column(name = "webrtc_type")
|
||||
private String type = FreeswitchWebRTCTypeEnum.CUSTOMER.name();
|
||||
private String type = FreeSwitchWebRTCTypeEnum.CUSTOMER.name();
|
||||
|
||||
/**
|
||||
* 客服状态
|
||||
|
||||
@@ -17,8 +17,8 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.SerializationUtils;
|
||||
|
||||
import com.bytedesk.core.config.BytedeskEventPublisher;
|
||||
import com.bytedesk.freeswitch.webrtc.event.FreeswitchWebRTCCreateEvent;
|
||||
import com.bytedesk.freeswitch.webrtc.event.FreeswitchWebRTCUpdateEvent;
|
||||
import com.bytedesk.freeswitch.webrtc.event.FreeSwitchWebRTCCreateEvent;
|
||||
import com.bytedesk.freeswitch.webrtc.event.FreeSwitchWebRTCUpdateEvent;
|
||||
import com.bytedesk.core.utils.ApplicationContextHolder;
|
||||
|
||||
import jakarta.persistence.PostPersist;
|
||||
@@ -28,24 +28,24 @@ import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class FreeswitchWebRTCEntityListener {
|
||||
public class FreeSwitchWebRTCEntityListener {
|
||||
|
||||
@PostPersist
|
||||
public void onPostPersist(FreeswitchWebRTCEntity webrtc) {
|
||||
public void onPostPersist(FreeSwitchWebRTCEntity webrtc) {
|
||||
log.info("onPostPersist: {}", webrtc);
|
||||
FreeswitchWebRTCEntity cloneFreeswitchWebRTC = SerializationUtils.clone(webrtc);
|
||||
FreeSwitchWebRTCEntity cloneFreeSwitchWebRTC = SerializationUtils.clone(webrtc);
|
||||
//
|
||||
BytedeskEventPublisher bytedeskEventPublisher = ApplicationContextHolder.getBean(BytedeskEventPublisher.class);
|
||||
bytedeskEventPublisher.publishEvent(new FreeswitchWebRTCCreateEvent(cloneFreeswitchWebRTC));
|
||||
bytedeskEventPublisher.publishEvent(new FreeSwitchWebRTCCreateEvent(cloneFreeSwitchWebRTC));
|
||||
}
|
||||
|
||||
@PostUpdate
|
||||
public void onPostUpdate(FreeswitchWebRTCEntity webrtc) {
|
||||
public void onPostUpdate(FreeSwitchWebRTCEntity webrtc) {
|
||||
log.info("onPostUpdate: {}", webrtc);
|
||||
FreeswitchWebRTCEntity cloneFreeswitchWebRTC = SerializationUtils.clone(webrtc);
|
||||
FreeSwitchWebRTCEntity cloneFreeSwitchWebRTC = SerializationUtils.clone(webrtc);
|
||||
//
|
||||
BytedeskEventPublisher bytedeskEventPublisher = ApplicationContextHolder.getBean(BytedeskEventPublisher.class);
|
||||
bytedeskEventPublisher.publishEvent(new FreeswitchWebRTCUpdateEvent(cloneFreeswitchWebRTC));
|
||||
bytedeskEventPublisher.publishEvent(new FreeSwitchWebRTCUpdateEvent(cloneFreeSwitchWebRTC));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class FreeswitchWebRTCEventListener {
|
||||
public class FreeSwitchWebRTCEventListener {
|
||||
|
||||
// private final FreeswitchWebRTCRestService webrtcRestService;
|
||||
// private final FreeSwitchWebRTCRestService webrtcRestService;
|
||||
|
||||
// @Order(3)
|
||||
// @EventListener
|
||||
@@ -31,7 +31,7 @@ public class FreeswitchWebRTCEventListener {
|
||||
// OrganizationEntity organization = (OrganizationEntity) event.getSource();
|
||||
// String orgUid = organization.getUid();
|
||||
// log.info("thread - organization created: {}", organization.getName());
|
||||
// webrtcRestService.initFreeswitchWebRTCs(orgUid);
|
||||
// webrtcRestService.initFreeSwitchWebRTCs(orgUid);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import lombok.Data;
|
||||
* https://github.com/alibaba/easyexcel
|
||||
*/
|
||||
@Data
|
||||
public class FreeswitchWebRTCExcel {
|
||||
public class FreeSwitchWebRTCExcel {
|
||||
|
||||
@ExcelProperty(index = 0, value = "标签名称")
|
||||
@ColumnWidth(20)
|
||||
|
||||
@@ -20,7 +20,7 @@ import lombok.AllArgsConstructor;
|
||||
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class FreeswitchWebRTCInitializer implements SmartInitializingSingleton {
|
||||
public class FreeSwitchWebRTCInitializer implements SmartInitializingSingleton {
|
||||
|
||||
@Override
|
||||
public void afterSingletonsInstantiated() {
|
||||
@@ -29,7 +29,7 @@ public class FreeswitchWebRTCInitializer implements SmartInitializingSingleton {
|
||||
|
||||
private void initPermissions() {
|
||||
// for (PermissionEnum permission : PermissionEnum.values()) {
|
||||
// String permissionValue = FreeswitchWebRTCPermissions.ARTICLE_PREFIX + permission.name();
|
||||
// String permissionValue = FreeSwitchWebRTCPermissions.ARTICLE_PREFIX + permission.name();
|
||||
// authorityService.createForPlatform(permissionValue);
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -15,6 +15,6 @@ package com.bytedesk.freeswitch.webrtc;
|
||||
|
||||
import com.bytedesk.core.base.BasePermissions;
|
||||
|
||||
public class FreeswitchWebRTCPermissions extends BasePermissions {
|
||||
public class FreeSwitchWebRTCPermissions extends BasePermissions {
|
||||
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ import java.util.Optional;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
|
||||
public interface FreeswitchWebRTCRepository extends JpaRepository<FreeswitchWebRTCEntity, Long>, JpaSpecificationExecutor<FreeswitchWebRTCEntity> {
|
||||
public interface FreeSwitchWebRTCRepository extends JpaRepository<FreeSwitchWebRTCEntity, Long>, JpaSpecificationExecutor<FreeSwitchWebRTCEntity> {
|
||||
|
||||
Optional<FreeswitchWebRTCEntity> findByUid(String uid);
|
||||
Optional<FreeSwitchWebRTCEntity> findByUid(String uid);
|
||||
|
||||
Boolean existsByUid(String uid);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import lombok.experimental.SuperBuilder;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class FreeswitchWebRTCRequest extends BaseRequest {
|
||||
public class FreeSwitchWebRTCRequest extends BaseRequest {
|
||||
|
||||
private String name;
|
||||
|
||||
@@ -37,7 +37,7 @@ public class FreeswitchWebRTCRequest extends BaseRequest {
|
||||
private String description = I18Consts.I18N_DESCRIPTION;
|
||||
|
||||
// @Builder.Default
|
||||
// private String type = FreeswitchWebRTCTypeEnum.CUSTOMER.name();
|
||||
// private String type = FreeSwitchWebRTCTypeEnum.CUSTOMER.name();
|
||||
|
||||
@Builder.Default
|
||||
private String color = "red";
|
||||
|
||||
@@ -29,7 +29,7 @@ import lombok.experimental.SuperBuilder;
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class FreeswitchWebRTCResponse extends BaseResponse {
|
||||
public class FreeSwitchWebRTCResponse extends BaseResponse {
|
||||
|
||||
private String name;
|
||||
|
||||
|
||||
@@ -30,34 +30,34 @@ import lombok.AllArgsConstructor;
|
||||
@RestController
|
||||
@RequestMapping("/api/v1/freeswitch/webrtc")
|
||||
@AllArgsConstructor
|
||||
public class FreeswitchWebRTCRestController extends BaseRestController<FreeswitchWebRTCRequest> {
|
||||
public class FreeSwitchWebRTCRestController extends BaseRestController<FreeSwitchWebRTCRequest> {
|
||||
|
||||
private final FreeswitchWebRTCRestService freeswitchWebRTCRestService;
|
||||
private final FreeSwitchWebRTCRestService freeswitchWebRTCRestService;
|
||||
|
||||
// @PreAuthorize(RolePermissions.ROLE_ADMIN)
|
||||
@ActionAnnotation(title = "视频客服", action = "组织查询", description = "query webrtc by org")
|
||||
@Override
|
||||
public ResponseEntity<?> queryByOrg(FreeswitchWebRTCRequest request) {
|
||||
public ResponseEntity<?> queryByOrg(FreeSwitchWebRTCRequest request) {
|
||||
|
||||
Page<FreeswitchWebRTCResponse> webrtcPage = freeswitchWebRTCRestService.queryByOrg(request);
|
||||
Page<FreeSwitchWebRTCResponse> webrtcPage = freeswitchWebRTCRestService.queryByOrg(request);
|
||||
|
||||
return ResponseEntity.ok(JsonResult.success(webrtcPage));
|
||||
}
|
||||
|
||||
@ActionAnnotation(title = "视频客服", action = "用户查询", description = "query webrtc by user")
|
||||
@Override
|
||||
public ResponseEntity<?> queryByUser(FreeswitchWebRTCRequest request) {
|
||||
public ResponseEntity<?> queryByUser(FreeSwitchWebRTCRequest request) {
|
||||
|
||||
Page<FreeswitchWebRTCResponse> webrtcPage = freeswitchWebRTCRestService.queryByUser(request);
|
||||
Page<FreeSwitchWebRTCResponse> webrtcPage = freeswitchWebRTCRestService.queryByUser(request);
|
||||
|
||||
return ResponseEntity.ok(JsonResult.success(webrtcPage));
|
||||
}
|
||||
|
||||
@ActionAnnotation(title = "视频客服", action = "查询详情", description = "query webrtc by uid")
|
||||
@Override
|
||||
public ResponseEntity<?> queryByUid(FreeswitchWebRTCRequest request) {
|
||||
public ResponseEntity<?> queryByUid(FreeSwitchWebRTCRequest request) {
|
||||
|
||||
FreeswitchWebRTCResponse webrtc = freeswitchWebRTCRestService.queryByUid(request);
|
||||
FreeSwitchWebRTCResponse webrtc = freeswitchWebRTCRestService.queryByUid(request);
|
||||
|
||||
return ResponseEntity.ok(JsonResult.success(webrtc));
|
||||
}
|
||||
@@ -65,9 +65,9 @@ public class FreeswitchWebRTCRestController extends BaseRestController<Freeswitc
|
||||
@ActionAnnotation(title = "视频客服", action = "新建", description = "create webrtc")
|
||||
@Override
|
||||
// @PreAuthorize("hasAuthority('TAG_CREATE')")
|
||||
public ResponseEntity<?> create(FreeswitchWebRTCRequest request) {
|
||||
public ResponseEntity<?> create(FreeSwitchWebRTCRequest request) {
|
||||
|
||||
FreeswitchWebRTCResponse webrtc = freeswitchWebRTCRestService.create(request);
|
||||
FreeSwitchWebRTCResponse webrtc = freeswitchWebRTCRestService.create(request);
|
||||
|
||||
return ResponseEntity.ok(JsonResult.success(webrtc));
|
||||
}
|
||||
@@ -75,9 +75,9 @@ public class FreeswitchWebRTCRestController extends BaseRestController<Freeswitc
|
||||
@ActionAnnotation(title = "视频客服", action = "更新", description = "update webrtc")
|
||||
@Override
|
||||
// @PreAuthorize("hasAuthority('TAG_UPDATE')")
|
||||
public ResponseEntity<?> update(FreeswitchWebRTCRequest request) {
|
||||
public ResponseEntity<?> update(FreeSwitchWebRTCRequest request) {
|
||||
|
||||
FreeswitchWebRTCResponse webrtc = freeswitchWebRTCRestService.update(request);
|
||||
FreeSwitchWebRTCResponse webrtc = freeswitchWebRTCRestService.update(request);
|
||||
|
||||
return ResponseEntity.ok(JsonResult.success(webrtc));
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public class FreeswitchWebRTCRestController extends BaseRestController<Freeswitc
|
||||
@ActionAnnotation(title = "视频客服", action = "删除", description = "delete webrtc")
|
||||
@Override
|
||||
// @PreAuthorize("hasAuthority('TAG_DELETE')")
|
||||
public ResponseEntity<?> delete(FreeswitchWebRTCRequest request) {
|
||||
public ResponseEntity<?> delete(FreeSwitchWebRTCRequest request) {
|
||||
|
||||
freeswitchWebRTCRestService.delete(request);
|
||||
|
||||
@@ -96,12 +96,12 @@ public class FreeswitchWebRTCRestController extends BaseRestController<Freeswitc
|
||||
@Override
|
||||
// @PreAuthorize("hasAuthority('TAG_EXPORT')")
|
||||
@GetMapping("/export")
|
||||
public Object export(FreeswitchWebRTCRequest request, HttpServletResponse response) {
|
||||
public Object export(FreeSwitchWebRTCRequest request, HttpServletResponse response) {
|
||||
return exportTemplate(
|
||||
request,
|
||||
response,
|
||||
freeswitchWebRTCRestService,
|
||||
FreeswitchWebRTCExcel.class,
|
||||
FreeSwitchWebRTCExcel.class,
|
||||
"视频客服",
|
||||
"webrtc"
|
||||
);
|
||||
|
||||
@@ -33,9 +33,9 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class FreeswitchWebRTCRestService extends BaseRestServiceWithExcel<FreeswitchWebRTCEntity, FreeswitchWebRTCRequest, FreeswitchWebRTCResponse, FreeswitchWebRTCExcel> {
|
||||
public class FreeSwitchWebRTCRestService extends BaseRestServiceWithExcel<FreeSwitchWebRTCEntity, FreeSwitchWebRTCRequest, FreeSwitchWebRTCResponse, FreeSwitchWebRTCExcel> {
|
||||
|
||||
private final FreeswitchWebRTCRepository webrtcRepository;
|
||||
private final FreeSwitchWebRTCRepository webrtcRepository;
|
||||
|
||||
private final ModelMapper modelMapper;
|
||||
|
||||
@@ -44,20 +44,20 @@ public class FreeswitchWebRTCRestService extends BaseRestServiceWithExcel<Freesw
|
||||
private final AuthService authService;
|
||||
|
||||
@Override
|
||||
public Page<FreeswitchWebRTCEntity> queryByOrgEntity(FreeswitchWebRTCRequest request) {
|
||||
public Page<FreeSwitchWebRTCEntity> queryByOrgEntity(FreeSwitchWebRTCRequest request) {
|
||||
Pageable pageable = request.getPageable();
|
||||
Specification<FreeswitchWebRTCEntity> spec = FreeswitchWebRTCSpecification.search(request);
|
||||
Specification<FreeSwitchWebRTCEntity> spec = FreeSwitchWebRTCSpecification.search(request);
|
||||
return webrtcRepository.findAll(spec, pageable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<FreeswitchWebRTCResponse> queryByOrg(FreeswitchWebRTCRequest request) {
|
||||
Page<FreeswitchWebRTCEntity> page = queryByOrgEntity(request);
|
||||
public Page<FreeSwitchWebRTCResponse> queryByOrg(FreeSwitchWebRTCRequest request) {
|
||||
Page<FreeSwitchWebRTCEntity> page = queryByOrgEntity(request);
|
||||
return page.map(this::convertToResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<FreeswitchWebRTCResponse> queryByUser(FreeswitchWebRTCRequest request) {
|
||||
public Page<FreeSwitchWebRTCResponse> queryByUser(FreeSwitchWebRTCRequest request) {
|
||||
UserEntity user = authService.getUser();
|
||||
if (user == null) {
|
||||
throw new RuntimeException("user not found");
|
||||
@@ -68,14 +68,14 @@ public class FreeswitchWebRTCRestService extends BaseRestServiceWithExcel<Freesw
|
||||
}
|
||||
|
||||
@Override
|
||||
public FreeswitchWebRTCResponse queryByUid(FreeswitchWebRTCRequest request) {
|
||||
public FreeSwitchWebRTCResponse queryByUid(FreeSwitchWebRTCRequest request) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'queryByUid'");
|
||||
}
|
||||
|
||||
@Cacheable(value = "webrtc", key = "#uid", unless="#result==null")
|
||||
@Override
|
||||
public Optional<FreeswitchWebRTCEntity> findByUid(String uid) {
|
||||
public Optional<FreeSwitchWebRTCEntity> findByUid(String uid) {
|
||||
return webrtcRepository.findByUid(uid);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class FreeswitchWebRTCRestService extends BaseRestServiceWithExcel<Freesw
|
||||
}
|
||||
|
||||
@Override
|
||||
public FreeswitchWebRTCResponse create(FreeswitchWebRTCRequest request) {
|
||||
public FreeSwitchWebRTCResponse create(FreeSwitchWebRTCRequest request) {
|
||||
// 判断是否已经存在
|
||||
if (StringUtils.hasText(request.getUid()) && existsByUid(request.getUid())) {
|
||||
return convertToResponse(findByUid(request.getUid()).get());
|
||||
@@ -95,12 +95,12 @@ public class FreeswitchWebRTCRestService extends BaseRestServiceWithExcel<Freesw
|
||||
request.setUserUid(user.getUid());
|
||||
}
|
||||
//
|
||||
FreeswitchWebRTCEntity entity = modelMapper.map(request, FreeswitchWebRTCEntity.class);
|
||||
FreeSwitchWebRTCEntity entity = modelMapper.map(request, FreeSwitchWebRTCEntity.class);
|
||||
if (!StringUtils.hasText(request.getUid())) {
|
||||
entity.setUid(uidUtils.getUid());
|
||||
}
|
||||
//
|
||||
FreeswitchWebRTCEntity savedEntity = save(entity);
|
||||
FreeSwitchWebRTCEntity savedEntity = save(entity);
|
||||
if (savedEntity == null) {
|
||||
throw new RuntimeException("Create webrtc failed");
|
||||
}
|
||||
@@ -108,34 +108,34 @@ public class FreeswitchWebRTCRestService extends BaseRestServiceWithExcel<Freesw
|
||||
}
|
||||
|
||||
@Override
|
||||
public FreeswitchWebRTCResponse update(FreeswitchWebRTCRequest request) {
|
||||
Optional<FreeswitchWebRTCEntity> optional = webrtcRepository.findByUid(request.getUid());
|
||||
public FreeSwitchWebRTCResponse update(FreeSwitchWebRTCRequest request) {
|
||||
Optional<FreeSwitchWebRTCEntity> optional = webrtcRepository.findByUid(request.getUid());
|
||||
if (optional.isPresent()) {
|
||||
FreeswitchWebRTCEntity entity = optional.get();
|
||||
FreeSwitchWebRTCEntity entity = optional.get();
|
||||
modelMapper.map(request, entity);
|
||||
//
|
||||
FreeswitchWebRTCEntity savedEntity = save(entity);
|
||||
FreeSwitchWebRTCEntity savedEntity = save(entity);
|
||||
if (savedEntity == null) {
|
||||
throw new RuntimeException("Update webrtc failed");
|
||||
}
|
||||
return convertToResponse(savedEntity);
|
||||
}
|
||||
else {
|
||||
throw new RuntimeException("FreeswitchWebRTC not found");
|
||||
throw new RuntimeException("FreeSwitchWebRTC not found");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected FreeswitchWebRTCEntity doSave(FreeswitchWebRTCEntity entity) {
|
||||
protected FreeSwitchWebRTCEntity doSave(FreeSwitchWebRTCEntity entity) {
|
||||
return webrtcRepository.save(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FreeswitchWebRTCEntity handleOptimisticLockingFailureException(ObjectOptimisticLockingFailureException e, FreeswitchWebRTCEntity entity) {
|
||||
public FreeSwitchWebRTCEntity handleOptimisticLockingFailureException(ObjectOptimisticLockingFailureException e, FreeSwitchWebRTCEntity entity) {
|
||||
try {
|
||||
Optional<FreeswitchWebRTCEntity> latest = webrtcRepository.findByUid(entity.getUid());
|
||||
Optional<FreeSwitchWebRTCEntity> latest = webrtcRepository.findByUid(entity.getUid());
|
||||
if (latest.isPresent()) {
|
||||
FreeswitchWebRTCEntity latestEntity = latest.get();
|
||||
FreeSwitchWebRTCEntity latestEntity = latest.get();
|
||||
// 合并需要保留的数据
|
||||
latestEntity.setName(entity.getName());
|
||||
// latestEntity.setOrder(entity.getOrder());
|
||||
@@ -151,30 +151,30 @@ public class FreeswitchWebRTCRestService extends BaseRestServiceWithExcel<Freesw
|
||||
|
||||
@Override
|
||||
public void deleteByUid(String uid) {
|
||||
Optional<FreeswitchWebRTCEntity> optional = webrtcRepository.findByUid(uid);
|
||||
Optional<FreeSwitchWebRTCEntity> optional = webrtcRepository.findByUid(uid);
|
||||
if (optional.isPresent()) {
|
||||
optional.get().setDeleted(true);
|
||||
save(optional.get());
|
||||
// webrtcRepository.delete(optional.get());
|
||||
}
|
||||
else {
|
||||
throw new RuntimeException("FreeswitchWebRTC not found");
|
||||
throw new RuntimeException("FreeSwitchWebRTC not found");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete(FreeswitchWebRTCRequest request) {
|
||||
public void delete(FreeSwitchWebRTCRequest request) {
|
||||
deleteByUid(request.getUid());
|
||||
}
|
||||
|
||||
@Override
|
||||
public FreeswitchWebRTCResponse convertToResponse(FreeswitchWebRTCEntity entity) {
|
||||
return modelMapper.map(entity, FreeswitchWebRTCResponse.class);
|
||||
public FreeSwitchWebRTCResponse convertToResponse(FreeSwitchWebRTCEntity entity) {
|
||||
return modelMapper.map(entity, FreeSwitchWebRTCResponse.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FreeswitchWebRTCExcel convertToExcel(FreeswitchWebRTCEntity entity) {
|
||||
return modelMapper.map(entity, FreeswitchWebRTCExcel.class);
|
||||
public FreeSwitchWebRTCExcel convertToExcel(FreeSwitchWebRTCEntity entity) {
|
||||
return modelMapper.map(entity, FreeSwitchWebRTCExcel.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ import jakarta.persistence.criteria.Predicate;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Slf4j
|
||||
public class FreeswitchWebRTCSpecification extends BaseSpecification {
|
||||
public class FreeSwitchWebRTCSpecification extends BaseSpecification {
|
||||
|
||||
public static Specification<FreeswitchWebRTCEntity> search(FreeswitchWebRTCRequest request) {
|
||||
public static Specification<FreeSwitchWebRTCEntity> search(FreeSwitchWebRTCRequest request) {
|
||||
log.info("request: {}", request);
|
||||
return (root, query, criteriaBuilder) -> {
|
||||
List<Predicate> predicates = new ArrayList<>();
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
*/
|
||||
package com.bytedesk.freeswitch.webrtc;
|
||||
|
||||
public enum FreeswitchWebRTCTypeEnum {
|
||||
public enum FreeSwitchWebRTCTypeEnum {
|
||||
THREAD,
|
||||
CUSTOMER,
|
||||
TICKET
|
||||
|
||||
@@ -15,20 +15,20 @@ package com.bytedesk.freeswitch.webrtc.event;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
||||
import com.bytedesk.freeswitch.webrtc.FreeswitchWebRTCEntity;
|
||||
import com.bytedesk.freeswitch.webrtc.FreeSwitchWebRTCEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class FreeswitchWebRTCCreateEvent extends ApplicationEvent {
|
||||
public class FreeSwitchWebRTCCreateEvent extends ApplicationEvent {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private FreeswitchWebRTCEntity webrtc;
|
||||
private FreeSwitchWebRTCEntity webrtc;
|
||||
|
||||
public FreeswitchWebRTCCreateEvent(FreeswitchWebRTCEntity webrtc) {
|
||||
public FreeSwitchWebRTCCreateEvent(FreeSwitchWebRTCEntity webrtc) {
|
||||
super(webrtc);
|
||||
this.webrtc = webrtc;
|
||||
}
|
||||
|
||||
@@ -15,20 +15,20 @@ package com.bytedesk.freeswitch.webrtc.event;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
||||
import com.bytedesk.freeswitch.webrtc.FreeswitchWebRTCEntity;
|
||||
import com.bytedesk.freeswitch.webrtc.FreeSwitchWebRTCEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class FreeswitchWebRTCDeleteEvent extends ApplicationEvent {
|
||||
public class FreeSwitchWebRTCDeleteEvent extends ApplicationEvent {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private FreeswitchWebRTCEntity webrtc;
|
||||
private FreeSwitchWebRTCEntity webrtc;
|
||||
|
||||
public FreeswitchWebRTCDeleteEvent(FreeswitchWebRTCEntity webrtc) {
|
||||
public FreeSwitchWebRTCDeleteEvent(FreeSwitchWebRTCEntity webrtc) {
|
||||
super(webrtc);
|
||||
this.webrtc = webrtc;
|
||||
}
|
||||
|
||||
@@ -15,20 +15,20 @@ package com.bytedesk.freeswitch.webrtc.event;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
||||
import com.bytedesk.freeswitch.webrtc.FreeswitchWebRTCEntity;
|
||||
import com.bytedesk.freeswitch.webrtc.FreeSwitchWebRTCEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class FreeswitchWebRTCUpdateEvent extends ApplicationEvent {
|
||||
public class FreeSwitchWebRTCUpdateEvent extends ApplicationEvent {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private FreeswitchWebRTCEntity webrtc;
|
||||
private FreeSwitchWebRTCEntity webrtc;
|
||||
|
||||
public FreeswitchWebRTCUpdateEvent(FreeswitchWebRTCEntity webrtc) {
|
||||
public FreeSwitchWebRTCUpdateEvent(FreeSwitchWebRTCEntity webrtc) {
|
||||
super(webrtc);
|
||||
this.webrtc = webrtc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user