mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-17 12:48:08 +00:00
update
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2024-06-21 14:28:06
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2025-03-06 10:17:52
|
||||
* @LastEditTime: 2025-03-11 09:06:19
|
||||
* @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.
|
||||
@@ -39,7 +39,7 @@ public class CategoryEventListener {
|
||||
//
|
||||
// CategoryRequest categoryFaqDemoRequest1 = CategoryRequest.builder()
|
||||
// .name(I18Consts.I18N_FAQ_CATEGORY_DEMO_1)
|
||||
// .orderNo(0)
|
||||
// .order(0)
|
||||
// .level(LevelEnum.ORGANIZATION.name())
|
||||
// .platform(BytedeskConsts.PLATFORM_BYTEDESK)
|
||||
// // .orgUid(orgUid)
|
||||
@@ -51,7 +51,7 @@ public class CategoryEventListener {
|
||||
// //
|
||||
// CategoryRequest categoryFaqDemoRequest2 = CategoryRequest.builder()
|
||||
// .name(I18Consts.I18N_FAQ_CATEGORY_DEMO_2)
|
||||
// .orderNo(0)
|
||||
// .order(0)
|
||||
// .level(LevelEnum.ORGANIZATION.name())
|
||||
// .platform(BytedeskConsts.PLATFORM_BYTEDESK)
|
||||
// // .orgUid(orgUid)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: jackning 270580156@qq.com
|
||||
* @Date: 2024-05-11 18:21:36
|
||||
* @LastEditors: jackning 270580156@qq.com
|
||||
* @LastEditTime: 2024-12-06 12:20:00
|
||||
* @LastEditTime: 2025-03-11 09:06:09
|
||||
* @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.
|
||||
@@ -25,7 +25,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
public interface CategoryRepository extends JpaRepository<CategoryEntity, Long>, JpaSpecificationExecutor<CategoryEntity> {
|
||||
Optional<CategoryEntity> findByUid(String uid);
|
||||
//
|
||||
List<CategoryEntity> findByParentAndPlatformAndDeletedOrderByOrderNoAsc(CategoryEntity parent, String platform,
|
||||
List<CategoryEntity> findByParentAndPlatformAndDeletedOrderByOrderAsc(CategoryEntity parent, String platform,
|
||||
Boolean deleted);
|
||||
|
||||
Optional<CategoryEntity> findByNameAndTypeAndOrgUidAndLevelAndPlatformAndDeletedFalse(String name, String type, String orgUid, String level, String platform);
|
||||
|
||||
@@ -54,14 +54,14 @@ public class CategoryRestService extends BaseRestService<CategoryEntity, Categor
|
||||
|
||||
public List<CategoryResponse> findByNullParent(String platform) {
|
||||
// 一级分类
|
||||
List<CategoryEntity> firstCategoriesList = categoryRepository.findByParentAndPlatformAndDeletedOrderByOrderNoAsc(null,
|
||||
List<CategoryEntity> firstCategoriesList = categoryRepository.findByParentAndPlatformAndDeletedOrderByOrderAsc(null,
|
||||
platform, false);
|
||||
|
||||
Iterator<CategoryEntity> iterator = firstCategoriesList.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
CategoryEntity category = iterator.next();
|
||||
// 二级分类
|
||||
List<CategoryEntity> secondCategoriesSet = categoryRepository.findByParentAndPlatformAndDeletedOrderByOrderNoAsc(category,
|
||||
List<CategoryEntity> secondCategoriesSet = categoryRepository.findByParentAndPlatformAndDeletedOrderByOrderAsc(category,
|
||||
platform, false);
|
||||
if (secondCategoriesSet != null && !secondCategoriesSet.isEmpty()) {
|
||||
category.setChildren(secondCategoriesSet);
|
||||
|
||||
@@ -103,6 +103,5 @@ public class ThreadInitializer implements SmartInitializingSingleton {
|
||||
tagRequest.setOrgUid(orgUid);
|
||||
tagRestService.create(tagRequest);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user