mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-27 05:43:42 +08:00
add ai delete
This commit is contained in:
@@ -15,6 +15,7 @@ import org.jooq.generated.mjga.tables.daos.DepartmentDao;
|
||||
import org.jooq.impl.DSL;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Repository
|
||||
public class DepartmentRepository extends DepartmentDao {
|
||||
@@ -95,4 +96,9 @@ public class DepartmentRepository extends DepartmentDao {
|
||||
.innerJoin(USER.department())
|
||||
.where(USER.ID.eq(userId));
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void deleteByName(String name) {
|
||||
ctx().deleteFrom(DEPARTMENT).where(DEPARTMENT.NAME.eq(name)).execute();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,7 @@ public class LlmRepository extends AiLlmConfigDao {
|
||||
public Result<Record> pageFetchBy(PageRequestDto pageRequestDto, LlmQueryDto llmQueryDto) {
|
||||
return ctx()
|
||||
.select(
|
||||
AI_LLM_CONFIG.asterisk(),
|
||||
DSL.count().over().as("total_llm").convertFrom(Long::valueOf))
|
||||
AI_LLM_CONFIG.asterisk(), DSL.count().over().as("total_llm").convertFrom(Long::valueOf))
|
||||
.from(AI_LLM_CONFIG)
|
||||
.where(
|
||||
StringUtils.isNotEmpty(llmQueryDto.name())
|
||||
|
||||
Reference in New Issue
Block a user