feat(分类模块): 实现分类管理功能

新增分类模块相关代码,包括实体类、DTO、Repository、Service和Controller
添加分类数据初始化逻辑和日志记录
实现分类的增删改查及搜索功能
This commit is contained in:
qingfeng1121
2025-10-12 14:23:42 +08:00
parent 299c9a57ec
commit 2809837422
9 changed files with 2475 additions and 5331 deletions

View File

@@ -0,0 +1,25 @@
package com.qf.myafterprojecy.repository;
import com.qf.myafterprojecy.pojo.Category;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface CategoryRepository extends JpaRepository<Category, Integer> {
/**
* 根据分类名称查询分类信息
* @param typename 分类名称
* @return 返回符合条件的分类列表
*/
List<Category> findByTypenameContaining(String typename);
/**
* 检查分类名称是否存在
* @param typename 分类名称
* @return 返回是否存在
*/
boolean existsByTypename(String typename);
}