feat(mapper): 添加StatementType配置以支持动态SQL执行
- 在JeeLowCodeSqlMapper接口中引入StatementType配置-为selectData方法添加@Options注解并设置statementType为STATEMENT -为selectPageData方法添加@Options注解并设置statementType为STATEMENT - 引入org.apache.ibatis.mapping.StatementType包以支持新功能 - 此变更使得Mapper能够正确处理动态生成的SQL语句
This commit is contained in:
@@ -6,6 +6,7 @@ import com.baomidou.dynamic.datasource.annotation.Master;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.jeelowcode.framework.tenant.annotation.JeeLowCodeTenantIgnore;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import org.apache.ibatis.mapping.StatementType;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -24,11 +25,13 @@ public interface JeeLowCodeSqlMapper {
|
||||
//获取数据 - 多个
|
||||
@DS(value = "#dataSourceType")
|
||||
@Select("${jeeLowCodeSelectSql}")
|
||||
@Options(statementType = StatementType.STATEMENT)
|
||||
List<Map<String, Object>> selectData(@Param("dataSourceType") String dataSourceType,@Param("jeeLowCodeSelectSql") String jeeLowCodeSelectSql,@Param("ew") Map<String,Object> ew);
|
||||
|
||||
//分页
|
||||
@DS(value = "#dataSourceType")
|
||||
@Select("${jeeLowCodeSelectSql}")
|
||||
@Options(statementType = StatementType.STATEMENT)
|
||||
IPage<Map<String, Object>> selectPageData(@Param("dataSourceType") String dataSourceType,IPage page,@Param("jeeLowCodeSelectSql") String jeeLowCodeSelectSql,@Param("ew") Map<String,Object> ew);
|
||||
|
||||
//新增数据
|
||||
|
||||
Reference in New Issue
Block a user