This commit is contained in:
jack ning
2025-03-28 17:15:08 +08:00
parent cafa25718e
commit cfde013ac1
37 changed files with 2158 additions and 2145 deletions

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-05-11 18:22:04
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-03-11 09:27:26
* @LastEditTime: 2025-03-28 17:06:13
* @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.
@@ -70,9 +70,7 @@ public class CategoryRestService extends BaseRestService<CategoryEntity, Categor
@Override
public Page<CategoryResponse> queryByOrg(CategoryRequest request) {
Pageable pageable = PageRequest.of(request.getPageNumber(), request.getPageSize(), Sort.Direction.ASC,
"updatedAt");
Pageable pageable = request.getPageable();
Specification<CategoryEntity> specs = CategorySpecification.search(request);
Page<CategoryEntity> page = categoryRepository.findAll(specs, pageable);
return page.map(this::convertToResponse);
@@ -117,7 +115,6 @@ public class CategoryRestService extends BaseRestService<CategoryEntity, Categor
return categoryRepository.findByKbUidAndDeletedFalse(kbUid);
}
public Boolean existsByUid(String uid) {
return categoryRepository.existsByUid(uid);
}

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-06-08 14:43:05
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-03-11 08:41:22
* @LastEditTime: 2025-03-28 17:03:58
* @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.
@@ -23,5 +23,6 @@ public enum CategoryTypeEnum {
BLOG,
EMAIL,
TABOO,
TICKET
TICKET,
FAQ
}

View File

@@ -54,7 +54,13 @@ public class BdDateUtils {
return null;
}
// 使用 DateTimeFormatter 直接格式化 LocalDateTime
return localDateTime.format(DateTimeFormatter.ofPattern(datetimeFormat));
// return localDateTime.format(DateTimeFormatter.ofPattern(datetimeFormat));
// 使用应用配置的时区
// ZonedDateTime zonedDateTime = localDateTime.atZone(LocaleContextHolder.getTimeZone().toZoneId());
// 或者固定使用中国时区
ZonedDateTime zonedDateTime = localDateTime.atZone(ZoneId.of("Asia/Shanghai"));
return DateTimeFormatter.ofPattern(datetimeFormat).format(zonedDateTime);
// 或者如果一定要使用 SimpleDateFormat可以这样转换
// try {

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-03-01 17:20:46
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-03-24 18:26:28
* @LastEditTime: 2025-03-28 14:22:30
* @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.
@@ -168,8 +168,6 @@ public class ConvertUtils {
messageResponse.setExtra(extra);
}
return messageResponse;
}