疯狂的狮子li
2021-11-01 c4e17ff8472fd9f8123e86b593b2968ad5936b15
ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml
@@ -60,17 +60,17 @@
   <select id="selectPageGenTableList" parameterType="GenTable" resultMap="GenTableResult">
      <include refid="selectGenTableVo"/>
      <where>
         <if test="tableName != null and tableName != ''">
            AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
         <if test="genTable.tableName != null and genTable.tableName != ''">
            AND lower(table_name) like lower(concat('%', #{genTable.tableName}, '%'))
         </if>
         <if test="tableComment != null and tableComment != ''">
            AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
         <if test="genTable.tableComment != null and genTable.tableComment != ''">
            AND lower(table_comment) like lower(concat('%', #{genTable.tableComment}, '%'))
         </if>
         <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
            AND date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
         <if test="genTable.params.beginTime != null and genTable.params.beginTime != ''"><!-- 开始时间检索 -->
            AND date_format(create_time,'%y%m%d') &gt;= date_format(#{genTable.params.beginTime},'%y%m%d')
         </if>
         <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
            AND date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
         <if test="genTable.params.endTime != null and genTable.params.endTime != ''"><!-- 结束时间检索 -->
            AND date_format(create_time,'%y%m%d') &lt;= date_format(#{genTable.params.endTime},'%y%m%d')
         </if>
      </where>
   </select>
@@ -80,18 +80,19 @@
      where table_schema = (select database())
      AND table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%'
      AND table_name NOT IN (select table_name from gen_table)
      <if test="tableName != null and tableName != ''">
         AND lower(table_name) like lower(concat('%', #{tableName}, '%'))
      <if test="genTable.tableName != null and genTable.tableName != ''">
         AND lower(table_name) like lower(concat('%', #{genTable.tableName}, '%'))
      </if>
      <if test="tableComment != null and tableComment != ''">
         AND lower(table_comment) like lower(concat('%', #{tableComment}, '%'))
      <if test="genTable.tableComment != null and genTable.tableComment != ''">
         AND lower(table_comment) like lower(concat('%', #{genTable.tableComment}, '%'))
      </if>
      <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
         AND date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
      <if test="genTable.params.beginTime != null and genTable.params.beginTime != ''"><!-- 开始时间检索 -->
         AND date_format(create_time,'%y%m%d') &gt;= date_format(#{genTable.params.beginTime},'%y%m%d')
      </if>
      <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
         AND date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
      <if test="genTable.params.endTime != null and genTable.params.endTime != ''"><!-- 结束时间检索 -->
         AND date_format(create_time,'%y%m%d') &lt;= date_format(#{genTable.params.endTime},'%y%m%d')
      </if>
      order by create_time desc
   </select>
@@ -130,6 +131,7 @@
      <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
         AND date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
      </if>
        order by create_time desc
   </select>
   
   <select id="selectDbTableListByNames" resultMap="GenTableResult">
@@ -162,7 +164,7 @@
          LEFT JOIN gen_table_column c ON t.table_id = c.table_id
      where t.table_name = #{tableName} order by c.sort
   </select>
   <select id="selectGenTableAll" parameterType="String" resultMap="GenTableResult">
       SELECT t.table_id, t.table_name, t.table_comment, t.sub_table_name, t.sub_table_fk_name, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark,
            c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort