重构:使用 MyBatis-Flex 迁移应用 ORM

将应用自管表的 JdbcClient 数据访问迁移为实体、Mapper、构造器查询和必要的显式 SQL。

保留 AgentScope 自管表及原有业务语义,并补充事务、查询与数据库集成测试。
This commit is contained in:
Zhu Junhao
2026-08-31 12:13:06 +08:00
parent c13302c0cb
commit e968a8ddc1
54 changed files with 3702 additions and 698 deletions

View File

@@ -0,0 +1,19 @@
package tech.easyflow.manuagent.mapper;
import com.mybatisflex.core.BaseMapper;
import org.apache.ibatis.annotations.Param;
import tech.easyflow.manuagent.entity.ArtifactEntity;
/**
* 提供产物基础查询以及 PostgreSQL 原子 upsert 能力。
*/
public interface ArtifactMapper extends BaseMapper<ArtifactEntity> {
/**
* 按“项目 + 相对路径”插入或更新产物,并返回数据库中的完整记录。
*
* @param artifact 待发布产物
* @return 插入或更新后的产物记录
*/
ArtifactEntity upsert(@Param("artifact") ArtifactEntity artifact);
}