feat: mcp测试版

This commit is contained in:
ageer
2025-04-14 00:22:21 +08:00
parent 4b53939002
commit 731352fd04
461 changed files with 3110 additions and 13838 deletions

View File

@@ -8,7 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<select id="selectDbTableColumnsByName" parameterType="String" resultMap="GenTableColumnResult">
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isMySql()">
<if test="@org.ruoyi.helper.DataBaseHelper@isMySql()">
select column_name,
(case when (is_nullable = 'no' <![CDATA[ && ]]> column_key != 'PRI') then '1' else null end) as is_required,
(case when column_key = 'PRI' then '1' else '0' end) as is_pk,
@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from information_schema.columns where table_schema = (select database()) and table_name = (#{tableName})
order by ordinal_position
</if>
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isOracle()">
<if test="@org.ruoyi.helper.DataBaseHelper@isOracle()">
select lower(temp.column_name) as column_name,
(case when (temp.nullable = 'N' and temp.constraint_type != 'P') then '1' else null end) as is_required,
(case when temp.constraint_type = 'P' then '1' else '0' end) as is_pk,
@@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE temp.row_flg = 1
ORDER BY temp.column_id
</if>
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isPostgerSql()">
<if test="@org.ruoyi.helper.DataBaseHelper@isPostgerSql()">
SELECT column_name, is_required, is_pk, sort, column_comment, is_increment, column_type
FROM (
SELECT c.relname AS table_name,
@@ -73,7 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE table_name = (#{tableName})
AND column_type <![CDATA[ <> ]]> '-'
</if>
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isSqlServer()">
<if test="@org.ruoyi.helper.DataBaseHelper@isSqlServer()">
SELECT
cast(A.NAME as nvarchar) as column_name,
cast(B.NAME as nvarchar) + (case when B.NAME = 'numeric' then '(' + cast(A.prec as nvarchar) + ',' + cast(A.scale as nvarchar) + ')' else '' end) as column_type,

View File

@@ -15,7 +15,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<select id="selectPageDbTableList" resultMap="GenTableResult">
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isMySql()">
<if test="@org.ruoyi.helper.DataBaseHelper@isMySql()">
select table_name, table_comment, create_time, update_time
from information_schema.tables
where table_schema = (select database())
@@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
order by create_time desc
</if>
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isOracle()">
<if test="@org.ruoyi.helper.DataBaseHelper@isOracle()">
select lower(dt.table_name) as table_name, dtc.comments as table_comment, uo.created as create_time, uo.last_ddl_time as update_time
from user_tables dt, user_tab_comments dtc, user_objects uo
where dt.table_name = dtc.table_name
@@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
order by create_time desc
</if>
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isPostgerSql()">
<if test="@org.ruoyi.helper.DataBaseHelper@isPostgerSql()">
select table_name, table_comment, create_time, update_time
from (
SELECT c.relname AS table_name,
@@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
order by create_time desc
</if>
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isSqlServer()">
<if test="@org.ruoyi.helper.DataBaseHelper@isSqlServer()">
SELECT cast(D.NAME as nvarchar) as table_name,
cast(F.VALUE as nvarchar) as table_comment,
crdate as create_time,
@@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectDbTableListByNames" resultMap="GenTableResult">
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isMySql()">
<if test="@org.ruoyi.helper.DataBaseHelper@isMySql()">
select table_name, table_comment, create_time, update_time from information_schema.tables
where table_name NOT LIKE 'xxl_job_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database())
and table_name in
@@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{name}
</foreach>
</if>
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isOracle()">
<if test="@org.ruoyi.helper.DataBaseHelper@isOracle()">
select lower(dt.table_name) as table_name, dtc.comments as table_comment, uo.created as create_time, uo.last_ddl_time as update_time
from user_tables dt, user_tab_comments dtc, user_objects uo
where dt.table_name = dtc.table_name
@@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{name}
</foreach>
</if>
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isPostgerSql()">
<if test="@org.ruoyi.helper.DataBaseHelper@isPostgerSql()">
select table_name, table_comment, create_time, update_time
from (
SELECT c.relname AS table_name,
@@ -131,7 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{name}
</foreach>
</if>
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isSqlServer()">
<if test="@org.ruoyi.helper.DataBaseHelper@isSqlServer()">
SELECT cast(D.NAME as nvarchar) as table_name,
cast(F.VALUE as nvarchar) as table_comment,
crdate as create_time,
@@ -148,12 +148,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectTableByName" parameterType="String" resultMap="GenTableResult">
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isMySql()">
<if test="@org.ruoyi.helper.DataBaseHelper@isMySql()">
select table_name, table_comment, create_time, update_time from information_schema.tables
where table_name NOT LIKE 'xxl_job_%' and table_name NOT LIKE 'gen_%' and table_schema = (select database())
and table_name = #{tableName}
</if>
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isOracle()">
<if test="@org.ruoyi.helper.DataBaseHelper@isOracle()">
select lower(dt.table_name) as table_name, dtc.comments as table_comment, uo.created as create_time, uo.last_ddl_time as update_time
from user_tables dt, user_tab_comments dtc, user_objects uo
where dt.table_name = dtc.table_name
@@ -163,7 +163,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND dt.table_name NOT IN (select table_name from gen_table)
and lower(dt.table_name) = #{tableName}
</if>
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isPostgerSql()">
<if test="@org.ruoyi.helper.DataBaseHelper@isPostgerSql()">
select table_name, table_comment, create_time, update_time
from (
SELECT c.relname AS table_name,
@@ -180,7 +180,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where table_name NOT LIKE 'xxl_job_%' and table_name NOT LIKE 'gen_%'
and table_name = #{tableName}
</if>
<if test="@org.ruoyi.common.mybatis.helper.DataBaseHelper@isSqlServer()">
<if test="@org.ruoyi.helper.DataBaseHelper@isSqlServer()">
SELECT cast(D.NAME as nvarchar) as table_name,
cast(F.VALUE as nvarchar) as table_comment,
crdate as create_time,

View File

@@ -1,7 +1,7 @@
package ${packageName}.domain.bo;
import ${packageName}.domain.${ClassName};
import org.ruoyi.common.mybatis.core.domain.BaseEntity;
import org.ruoyi.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;

View File

@@ -11,7 +11,7 @@ import org.springframework.validation.annotation.Validated;
import annotation.idempotent.common.org.ruoyi.RepeatSubmit;
import org.ruoyi.common.log.annotation.Log;
import org.ruoyi.common.web.core.BaseController;
import org.ruoyi.common.mybatis.core.page.PageQuery;
import org.ruoyi.core.page.PageQuery;
import org.ruoyi.common.core.domain.R;
import org.ruoyi.common.core.validate.AddGroup;
import org.ruoyi.common.core.validate.EditGroup;
@@ -21,7 +21,7 @@ import ${packageName}.domain.vo.${ClassName}Vo;
import ${packageName}.domain.bo.${ClassName}Bo;
import ${packageName}.service.I${ClassName}Service;
#if($table.crud || $table.sub)
import org.ruoyi.common.mybatis.core.page.TableDataInfo;
import org.ruoyi.core.page.TableDataInfo;
#elseif($table.tree)
#end

View File

@@ -2,7 +2,7 @@ package ${packageName}.mapper;
import ${packageName}.domain.${ClassName};
import ${packageName}.domain.vo.${ClassName}Vo;
import org.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
import org.ruoyi.core.mapper.BaseMapperPlus;
/**
* ${functionName}Mapper接口

View File

@@ -4,8 +4,8 @@ import ${packageName}.domain.${ClassName};
import ${packageName}.domain.vo.${ClassName}Vo;
import ${packageName}.domain.bo.${ClassName}Bo;
#if($table.crud || $table.sub)
import org.ruoyi.common.mybatis.core.page.TableDataInfo;
import org.ruoyi.common.mybatis.core.page.PageQuery;
import org.ruoyi.core.page.TableDataInfo;
import org.ruoyi.core.page.PageQuery;
#end
import java.util.Collection;

View File

@@ -2,8 +2,8 @@ package ${packageName}.service.impl;
import org.ruoyi.common.core.utils.MapstructUtils;
#if($table.crud || $table.sub)
import org.ruoyi.common.mybatis.core.page.TableDataInfo;
import org.ruoyi.common.mybatis.core.page.PageQuery;
import org.ruoyi.core.page.TableDataInfo;
import org.ruoyi.core.page.PageQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
#end
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;