package aiyh.utils.apirequest.mapper; import aiyh.utils.annotation.recordset.CaseConversion; import aiyh.utils.annotation.recordset.ParamMapper; import aiyh.utils.annotation.recordset.Select; import aiyh.utils.annotation.recordset.SqlMapper; import java.util.List; import java.util.Map; /** *

数据来源逻辑处理查询数据库

*

create 2022/1/26 0026 14:10

* * @author EBU7-dev1-ayh */ @SqlMapper public interface DataSourceMapper { /** * 根据流程id查询流程表 * @param versionIds 流程所有版本的id * @return 流程对应的表名 */ @Select("select distinct tablename from workflow_base wb " + "left join workflow_bill wbi on wbi.id = wb.formid " + "where wb.id in (${versionIds})") public String selectWorkflowTableById(@ParamMapper("versionIds") String[] versionIds); @Select("select * from $t{workflowTable} where requestid = #{requestid}") @CaseConversion(false) Map selectMainData(@ParamMapper("workflowTable") String workflowTable, @ParamMapper("requestId") String requestId); @Select("select * from $t{detailTable} where mainid = #{mainId}") @CaseConversion(false) List> selectDetailData(@ParamMapper("detailTable") String requestDetailTableName, @ParamMapper("mainId") String mainId); }