Files
ManuAgent/server/src/main/java/tech/easyflow/manuagent/mapper/ProjectPlanMapper.java
Zhu Junhao e968a8ddc1 重构:使用 MyBatis-Flex 迁移应用 ORM
将应用自管表的 JdbcClient 数据访问迁移为实体、Mapper、构造器查询和必要的显式 SQL。

保留 AgentScope 自管表及原有业务语义,并补充事务、查询与数据库集成测试。
2026-08-31 12:13:06 +08:00

26 lines
967 B
Java

package tech.easyflow.manuagent.mapper;
import com.mybatisflex.core.BaseMapper;
import java.util.UUID;
import org.apache.ibatis.annotations.Param;
import tech.easyflow.manuagent.entity.ProjectPlanEntity;
/**
* 提供规划版本查询以及带条件的草稿写入、确认能力。
*/
public interface ProjectPlanMapper extends BaseMapper<ProjectPlanEntity> {
/** 插入项目下一版草稿并返回完整记录。 */
ProjectPlanEntity insertNextDraft(@Param("plan") ProjectPlanEntity plan);
/** 按“已确认优先、版本倒序”读取项目当前规划。 */
ProjectPlanEntity selectCurrent(@Param("projectId") UUID projectId);
/** 仅将仍处于 DRAFT 的指定版本确认,并返回确认后的记录。 */
ProjectPlanEntity confirmDraft(
@Param("projectId") UUID projectId,
@Param("planId") UUID planId,
@Param("planJson") String planJson,
@Param("userId") UUID userId);
}