update modules/ai: mod 3 files

This commit is contained in:
jack ning
2025-03-24 18:08:29 +08:00
parent 7853b31c79
commit 245ffbdae1
2 changed files with 12 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-03-22 16:44:54
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-02-26 15:21:22
* @LastEditTime: 2025-03-24 18:03: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.
@@ -13,6 +13,7 @@
*/
package com.bytedesk.ai.robot;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
@@ -34,4 +35,10 @@ public interface RobotRepository extends JpaRepository<RobotEntity, Long>, JpaSp
Boolean existsByUidAndDeleted(String uid, Boolean deleted);
Boolean existsByNicknameAndOrgUidAndDeleted(String nickname, String orgUid, Boolean deleted);
// 查找 level === orgnization 且 deleted === false 且 type === SERVICE 的机器人
List<RobotEntity> findByLevelAndDeletedFalseAndType(String level, String type);
// 查找 level === orgnization 且 deleted === false 的机器人
}

View File

@@ -2,7 +2,7 @@
* @Author: jackning 270580156@qq.com
* @Date: 2024-06-12 09:07:53
* @LastEditors: jackning 270580156@qq.com
* @LastEditTime: 2025-03-24 16:35:32
* @LastEditTime: 2025-03-24 17:55:53
* @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.
@@ -58,9 +58,9 @@ public class RobotSpecification extends BaseSpecification {
if (StringUtils.hasText(request.getLevel())) {
predicates.add(criteriaBuilder.equal(root.get("level"), request.getLevel()));
}
// if (StringUtils.hasText(request.getCategoryUid())) {
// predicates.add(criteriaBuilder.equal(root.get("categoryUid"), request.getCategoryUid()));
// }
if (StringUtils.hasText(request.getCategoryUid())) {
predicates.add(criteriaBuilder.equal(root.get("categoryUid"), request.getCategoryUid()));
}
if (StringUtils.hasText(request.getType())) {
predicates.add(criteriaBuilder.equal(root.get("type"), request.getType()));
}