package jnpf.limsMapper;
|
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Select;
|
|
/**
|
* 只读访问平台流程模板表 workflow_template,按流程编码反解 templateId。
|
* 不继承 SuperMapper:无对应 LIMS 实体,仅做标量 SELECT(避免 MP 按实体推断错误表名/列映射,见 lessons L007)。
|
*/
|
@Mapper
|
public interface WorkflowTemplateMapper {
|
|
/**
|
* 按流程编码查"已上架且启用"的流程模板主键(= launchFlow 的 templateId);查不到返回 null。
|
* 过滤软删、固定按创建时间倒序取最新一条,避免重导/历史行造成的不确定。
|
*/
|
@Select("SELECT f_id FROM workflow_template "
|
+ "WHERE f_en_code = #{enCode} AND f_status = 1 AND f_enabled_mark = 1 "
|
+ "AND (f_delete_mark IS NULL OR f_delete_mark <> 1) "
|
+ "ORDER BY f_creator_time DESC LIMIT 1")
|
String findTemplateIdByEnCode(@Param("enCode") String enCode);
|
}
|