Browse Source

表名更改

suochencheng 7 năm trước cách đây
mục cha
commit
ea16df4db0

+ 2 - 2
src/main/java/com/izouma/awesomeadmin/dao/AccessTokenMapper.xml

@@ -7,14 +7,14 @@
 		SELECT
 			*
 		FROM
-			access_token
+			sys_access_token
 		ORDER BY
 			time_stamp DESC
 		LIMIT 1
 	</select>
 	
 	<insert id="updateAccessToken" parameterType="map">
-	    INSERT INTO access_token (access_token, time_stamp)
+	    INSERT INTO sys_access_token (access_token, time_stamp)
 		VALUES (#{accessToken}, #{timeStamp})
   	</insert>
 

+ 9 - 9
src/main/java/com/izouma/awesomeadmin/dao/DataSourceInfoMapper.xml

@@ -34,15 +34,15 @@
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
         select
         <include refid="Base_Column_List" />
-        from data_source_info
+        from sys_data_source_info
         where id = #{id,jdbcType=INTEGER}
     </select>
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-        delete from data_source_info
+        delete from sys_data_source_info
         where id = #{id,jdbcType=INTEGER}
     </delete>
     <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.DataSourceInfo" useGeneratedKeys="true" keyProperty="id">
-        insert into data_source_info
+        insert into sys_data_source_info
         <trim prefix="(" suffix=")" suffixOverrides="," >
                 <if test="id!= null" >
                 id,
@@ -97,7 +97,7 @@
                 </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.DataSourceInfo" >
-        update data_source_info
+        update sys_data_source_info
         <set >
                     <if test="id != null" >
                id= #{id,jdbcType=INTEGER},
@@ -127,7 +127,7 @@
         where id = #{id,jdbcType=INTEGER}
     </update>
     <select id="queryDataSourceInfoByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DataSourceInfo">
-        select <include refid="Base_Column_List"/> from data_source_info
+        select <include refid="Base_Column_List"/> from sys_data_source_info
         <where>
             and del_flag = 'N'
                     <if test="record.id != null and !&quot;&quot;.equals(record.id)">
@@ -204,7 +204,7 @@
         order by id desc
     </select>
     <select id="queryAllDataSourceInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DataSourceInfo">
-        select <include refid="Base_Column_List"/> from data_source_info
+        select <include refid="Base_Column_List"/> from sys_data_source_info
         <where>
             and del_flag = 'N'
                     <if test="id != null and !&quot;&quot;.equals(id)">
@@ -279,7 +279,7 @@
         order by id desc
     </select>
     <select id="queryDataSourceInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DataSourceInfo">
-        select <include refid="Base_Column_List"/> from data_source_info
+        select <include refid="Base_Column_List"/> from sys_data_source_info
         <where>
             and del_flag = 'N'
                     <if test="id != null and !&quot;&quot;.equals(id)">
@@ -311,13 +311,13 @@
         LIMIT 1
     </select>
     <update id="delete">
-        UPDATE data_source_info SET del_flag = 'Y'
+        UPDATE sys_data_source_info SET del_flag = 'Y'
         <where>
             AND id = #{id}
         </where>
     </update>
     <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.DataSourceInfo">
-        select <include refid="Base_Column_List"/> from data_source_info
+        select <include refid="Base_Column_List"/> from sys_data_source_info
         <where>
             and del_flag = 'N'
                                                                                                                                                                                                                                                     </where>

+ 8 - 13
src/main/java/com/izouma/awesomeadmin/dao/GenCodeMapper.xml

@@ -13,28 +13,23 @@
         <result column="field_id" property="fieldId" jdbcType="VARCHAR"/>
         <result column="gen_json" property="genJson" jdbcType="VARCHAR"/>
         <result column="del_flag" property="delFlag" jdbcType="VARCHAR"/>
-        <collection property="fields" column="field_id" ofType="com.izouma.awesomeadmin.model.TableField"
-                    select="selectTableField"/>
     </resultMap>
-    <select id="selectTableField" parameterType="string" resultType="com.izouma.awesomeadmin.model.TableField">
-        select * from table_field where FIND_IN_SET(id, #{field_id})
-    </select>
     <sql id="Base_Column_List">
 		 id, tableName, className, remark, genTable, genClass, genList, genForm, field_id, gen_json, del_flag
 	</sql>
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
         select
         <include refid="Base_Column_List"/>
-        from gen_code
+        from sys_gen_code
         where id = #{id,jdbcType=INTEGER}
     </select>
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-		delete from gen_code
+		delete from sys_gen_code
 		where id = #{id,jdbcType=INTEGER}
 	</delete>
     <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.GenCode" useGeneratedKeys="true"
             keyProperty="id">
-        insert into gen_code
+        insert into sys_gen_code
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="id != null">
                 id,
@@ -101,7 +96,7 @@
         </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.GenCode">
-        update gen_code
+        update sys_gen_code
         <set>
             <if test="tableName != null">
                 tableName = #{tableName,jdbcType=VARCHAR},
@@ -136,7 +131,7 @@
     <select id="queryGenCodeByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenCode">
         select
         <include refid="Base_Column_List"/>
-        from gen_code
+        from sys_gen_code
         <where>
             and del_flag = 'N'
             <if test="record.id != null and !&quot;&quot;.equals(record.id)">
@@ -179,7 +174,7 @@
     <select id="queryAllGenCode" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenCode">
         select
         <include refid="Base_Column_List"/>
-        from gen_code
+        from sys_gen_code
         <where>
             and del_flag = 'N'
             <if test="id != null and !&quot;&quot;.equals(id)">
@@ -215,7 +210,7 @@
     <select id="queryGenCode" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.GenCode">
         select
         <include refid="Base_Column_List"/>
-        from gen_code
+        from sys_gen_code
         <where>
             and del_flag = 'N'
             <if test="id != null and !&quot;&quot;.equals(id)">
@@ -249,7 +244,7 @@
         LIMIT 1
     </select>
     <update id="delete">
-        UPDATE gen_code SET del_flag = 'Y'
+        UPDATE sys_gen_code SET del_flag = 'Y'
         <where>
             AND id = #{id}
         </where>

+ 215 - 207
src/main/java/com/izouma/awesomeadmin/dao/PowerInfoMapper.xml

@@ -1,216 +1,224 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.izouma.awesomeadmin.dao.PowerInfoMapper" >
-	<resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.PowerInfo" >
-		<id column="id" property="id" jdbcType="INTEGER" />
-		<result column="role_id" property="roleId" jdbcType="INTEGER" />
-		<result column="menu_id" property="menuId" jdbcType="INTEGER" />
-		<result column="can_add" property="canAdd" jdbcType="INTEGER" />
-		<result column="can_delete" property="canDelete" jdbcType="INTEGER" />
-		<result column="can_update" property="canUpdate" jdbcType="INTEGER" />
-		<result column="can_select" property="canSelect" jdbcType="INTEGER" />
-		<result column="del_flag" property="delFlag" jdbcType="CHAR" />
-	</resultMap>
-	<sql id="Base_Column_List" >
+<mapper namespace="com.izouma.awesomeadmin.dao.PowerInfoMapper">
+    <resultMap id="BaseResultMap" type="com.izouma.awesomeadmin.model.PowerInfo">
+        <id column="id" property="id" jdbcType="INTEGER"/>
+        <result column="role_id" property="roleId" jdbcType="INTEGER"/>
+        <result column="menu_id" property="menuId" jdbcType="INTEGER"/>
+        <result column="can_add" property="canAdd" jdbcType="INTEGER"/>
+        <result column="can_delete" property="canDelete" jdbcType="INTEGER"/>
+        <result column="can_update" property="canUpdate" jdbcType="INTEGER"/>
+        <result column="can_select" property="canSelect" jdbcType="INTEGER"/>
+        <result column="del_flag" property="delFlag" jdbcType="CHAR"/>
+    </resultMap>
+    <sql id="Base_Column_List">
 		 id, role_id, menu_id, can_add, can_delete, can_update, can_select, del_flag
 	</sql>
-	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
-		select
-		<include refid="Base_Column_List" />
-		from power_info
-		where id = #{id,jdbcType=INTEGER}
-	</select>
-	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-		delete from power_info
+    <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_power_info
+        where id = #{id,jdbcType=INTEGER}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+		delete from sys_power_info
 		where id = #{id,jdbcType=INTEGER}
 	</delete>
-	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.PowerInfo" useGeneratedKeys="true" keyProperty="id">
-		insert into power_info
-		<trim prefix="(" suffix=")" suffixOverrides="," >
-			<if test="id != null" >
-				id,	
-			</if>
-			<if test="roleId != null" >
-				role_id,	
-			</if>
-			<if test="menuId != null" >
-				menu_id,	
-			</if>
-			<if test="canAdd != null" >
-				can_add,	
-			</if>
-			<if test="canDelete != null" >
-				can_delete,	
-			</if>
-			<if test="canUpdate != null" >
-				can_update,	
-			</if>
-			<if test="canSelect != null" >
-				can_select,	
-			</if>
-			<if test="delFlag != null" >
-				del_flag,	
-			</if>
-		</trim>
-		<trim prefix="values (" suffix=")" suffixOverrides="," >
-			<if test="id != null" >
-				#{id,jdbcType=INTEGER},	
-			</if>
-			<if test="roleId != null" >
-				#{roleId,jdbcType=INTEGER},	
-			</if>
-			<if test="menuId != null" >
-				#{menuId,jdbcType=INTEGER},	
-			</if>
-			<if test="canAdd != null" >
-				#{canAdd,jdbcType=INTEGER},	
-			</if>
-			<if test="canDelete != null" >
-				#{canDelete,jdbcType=INTEGER},	
-			</if>
-			<if test="canUpdate != null" >
-				#{canUpdate,jdbcType=INTEGER},	
-			</if>
-			<if test="canSelect != null" >
-				#{canSelect,jdbcType=INTEGER},	
-			</if>
-			<if test="delFlag != null" >
-				#{delFlag,jdbcType=CHAR},	
-			</if>
-		</trim>
-	</insert>
-	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.PowerInfo" >
-		update power_info
-		<set >
-			<if test="roleId != null" >
-				role_id = #{roleId,jdbcType=INTEGER},	
-			</if>
-			<if test="menuId != null" >
-				menu_id = #{menuId,jdbcType=INTEGER},	
-			</if>
-			<if test="canAdd != null" >
-				can_add = #{canAdd,jdbcType=INTEGER},	
-			</if>
-			<if test="canDelete != null" >
-				can_delete = #{canDelete,jdbcType=INTEGER},	
-			</if>
-			<if test="canUpdate != null" >
-				can_update = #{canUpdate,jdbcType=INTEGER},	
-			</if>
-			<if test="canSelect != null" >
-				can_select = #{canSelect,jdbcType=INTEGER},	
-			</if>
-			<if test="delFlag != null" >
-				del_flag = #{delFlag,jdbcType=CHAR},	
-			</if>
-		</set>
-		where id = #{id,jdbcType=INTEGER}
-	</update>
-	<select id="queryPowerInfosByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PowerInfo">
-		select <include refid="Base_Column_List"/> from power_info
-		<where>
-			and del_flag = 'N'
-			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
-				and id = #{record.id}	
-			</if>
-			<if test="record.roleId != null and !&quot;&quot;.equals(record.roleId)">
-				and role_id = #{record.roleId}	
-			</if>
-			<if test="record.menuId != null and !&quot;&quot;.equals(record.menuId)">
-				and menu_id = #{record.menuId}	
-			</if>
-			<if test="record.canAdd != null and !&quot;&quot;.equals(record.canAdd)">
-				and can_add = #{record.canAdd}	
-			</if>
-			<if test="record.canDelete != null and !&quot;&quot;.equals(record.canDelete)">
-				and can_delete = #{record.canDelete}	
-			</if>
-			<if test="record.canUpdate != null and !&quot;&quot;.equals(record.canUpdate)">
-				and can_update = #{record.canUpdate}	
-			</if>
-			<if test="record.canSelect != null and !&quot;&quot;.equals(record.canSelect)">
-				and can_select = #{record.canSelect}	
-			</if>
-		</where>
-		order by id desc
-	</select>
-	<select id="queryAllPowerInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PowerInfo">
-		select <include refid="Base_Column_List"/> from power_info
-		<where>
-			and del_flag = 'N'
-			<if test="id != null and !&quot;&quot;.equals(id)">
-				and id = #{id}	
-			</if>
-			<if test="roleId != null and !&quot;&quot;.equals(roleId)">
-				and role_id = #{roleId}	
-			</if>
-			<if test="menuId != null and !&quot;&quot;.equals(menuId)">
-				and menu_id = #{menuId}	
-			</if>
-			<if test="canAdd != null and !&quot;&quot;.equals(canAdd)">
-				and can_add = #{canAdd}	
-			</if>
-			<if test="canDelete != null and !&quot;&quot;.equals(canDelete)">
-				and can_delete = #{canDelete}	
-			</if>
-			<if test="canUpdate != null and !&quot;&quot;.equals(canUpdate)">
-				and can_update = #{canUpdate}	
-			</if>
-			<if test="canSelect != null and !&quot;&quot;.equals(canSelect)">
-				and can_select = #{canSelect}	
-			</if>
-			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
-				and del_flag = #{delFlag}	
-			</if>
-			<if test="roleIdStr != null and !&quot;&quot;.equals(roleIdStr)">
-				and role_id in (${roleIdStr})
-			</if>
-		</where>
-		order by id desc
-	</select>
-	<select id="queryPowerInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PowerInfo">
-		select <include refid="Base_Column_List"/> from power_info
-		<where>
-			and del_flag = 'N'
-			<if test="id != null and !&quot;&quot;.equals(id)">
-				and id = #{id}	
-			</if>
-			<if test="roleId != null and !&quot;&quot;.equals(roleId)">
-				and role_id = #{roleId}	
-			</if>
-			<if test="menuId != null and !&quot;&quot;.equals(menuId)">
-				and menu_id = #{menuId}	
-			</if>
-			<if test="canAdd != null and !&quot;&quot;.equals(canAdd)">
-				and can_add = #{canAdd}	
-			</if>
-			<if test="canDelete != null and !&quot;&quot;.equals(canDelete)">
-				and can_delete = #{canDelete}	
-			</if>
-			<if test="canUpdate != null and !&quot;&quot;.equals(canUpdate)">
-				and can_update = #{canUpdate}	
-			</if>
-			<if test="canSelect != null and !&quot;&quot;.equals(canSelect)">
-				and can_select = #{canSelect}	
-			</if>
-			<if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
-				and del_flag = #{delFlag}	
-			</if>
-		</where>
-		LIMIT 1
-	</select>
-	<update id="delete">
-		UPDATE power_info SET del_flag = 'Y'
-		<where>
-			AND id = #{id}
-		</where>
-	</update>
+    <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.PowerInfo" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into sys_power_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                id,
+            </if>
+            <if test="roleId != null">
+                role_id,
+            </if>
+            <if test="menuId != null">
+                menu_id,
+            </if>
+            <if test="canAdd != null">
+                can_add,
+            </if>
+            <if test="canDelete != null">
+                can_delete,
+            </if>
+            <if test="canUpdate != null">
+                can_update,
+            </if>
+            <if test="canSelect != null">
+                can_select,
+            </if>
+            <if test="delFlag != null">
+                del_flag,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=INTEGER},
+            </if>
+            <if test="roleId != null">
+                #{roleId,jdbcType=INTEGER},
+            </if>
+            <if test="menuId != null">
+                #{menuId,jdbcType=INTEGER},
+            </if>
+            <if test="canAdd != null">
+                #{canAdd,jdbcType=INTEGER},
+            </if>
+            <if test="canDelete != null">
+                #{canDelete,jdbcType=INTEGER},
+            </if>
+            <if test="canUpdate != null">
+                #{canUpdate,jdbcType=INTEGER},
+            </if>
+            <if test="canSelect != null">
+                #{canSelect,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                #{delFlag,jdbcType=CHAR},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.PowerInfo">
+        update sys_power_info
+        <set>
+            <if test="roleId != null">
+                role_id = #{roleId,jdbcType=INTEGER},
+            </if>
+            <if test="menuId != null">
+                menu_id = #{menuId,jdbcType=INTEGER},
+            </if>
+            <if test="canAdd != null">
+                can_add = #{canAdd,jdbcType=INTEGER},
+            </if>
+            <if test="canDelete != null">
+                can_delete = #{canDelete,jdbcType=INTEGER},
+            </if>
+            <if test="canUpdate != null">
+                can_update = #{canUpdate,jdbcType=INTEGER},
+            </if>
+            <if test="canSelect != null">
+                can_select = #{canSelect,jdbcType=INTEGER},
+            </if>
+            <if test="delFlag != null">
+                del_flag = #{delFlag,jdbcType=CHAR},
+            </if>
+        </set>
+        where id = #{id,jdbcType=INTEGER}
+    </update>
+    <select id="queryPowerInfosByPage" parameterType="java.util.Map"
+            resultType="com.izouma.awesomeadmin.model.PowerInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_power_info
+        <where>
+            and del_flag = 'N'
+            <if test="record.id != null and !&quot;&quot;.equals(record.id)">
+                and id = #{record.id}
+            </if>
+            <if test="record.roleId != null and !&quot;&quot;.equals(record.roleId)">
+                and role_id = #{record.roleId}
+            </if>
+            <if test="record.menuId != null and !&quot;&quot;.equals(record.menuId)">
+                and menu_id = #{record.menuId}
+            </if>
+            <if test="record.canAdd != null and !&quot;&quot;.equals(record.canAdd)">
+                and can_add = #{record.canAdd}
+            </if>
+            <if test="record.canDelete != null and !&quot;&quot;.equals(record.canDelete)">
+                and can_delete = #{record.canDelete}
+            </if>
+            <if test="record.canUpdate != null and !&quot;&quot;.equals(record.canUpdate)">
+                and can_update = #{record.canUpdate}
+            </if>
+            <if test="record.canSelect != null and !&quot;&quot;.equals(record.canSelect)">
+                and can_select = #{record.canSelect}
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryAllPowerInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PowerInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_power_info
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="roleId != null and !&quot;&quot;.equals(roleId)">
+                and role_id = #{roleId}
+            </if>
+            <if test="menuId != null and !&quot;&quot;.equals(menuId)">
+                and menu_id = #{menuId}
+            </if>
+            <if test="canAdd != null and !&quot;&quot;.equals(canAdd)">
+                and can_add = #{canAdd}
+            </if>
+            <if test="canDelete != null and !&quot;&quot;.equals(canDelete)">
+                and can_delete = #{canDelete}
+            </if>
+            <if test="canUpdate != null and !&quot;&quot;.equals(canUpdate)">
+                and can_update = #{canUpdate}
+            </if>
+            <if test="canSelect != null and !&quot;&quot;.equals(canSelect)">
+                and can_select = #{canSelect}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+            <if test="roleIdStr != null and !&quot;&quot;.equals(roleIdStr)">
+                and role_id in (${roleIdStr})
+            </if>
+        </where>
+        order by id desc
+    </select>
+    <select id="queryPowerInfo" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.PowerInfo">
+        select
+        <include refid="Base_Column_List"/>
+        from sys_power_info
+        <where>
+            and del_flag = 'N'
+            <if test="id != null and !&quot;&quot;.equals(id)">
+                and id = #{id}
+            </if>
+            <if test="roleId != null and !&quot;&quot;.equals(roleId)">
+                and role_id = #{roleId}
+            </if>
+            <if test="menuId != null and !&quot;&quot;.equals(menuId)">
+                and menu_id = #{menuId}
+            </if>
+            <if test="canAdd != null and !&quot;&quot;.equals(canAdd)">
+                and can_add = #{canAdd}
+            </if>
+            <if test="canDelete != null and !&quot;&quot;.equals(canDelete)">
+                and can_delete = #{canDelete}
+            </if>
+            <if test="canUpdate != null and !&quot;&quot;.equals(canUpdate)">
+                and can_update = #{canUpdate}
+            </if>
+            <if test="canSelect != null and !&quot;&quot;.equals(canSelect)">
+                and can_select = #{canSelect}
+            </if>
+            <if test="delFlag != null and !&quot;&quot;.equals(delFlag)">
+                and del_flag = #{delFlag}
+            </if>
+        </where>
+        LIMIT 1
+    </select>
+    <update id="delete">
+        UPDATE sys_power_info SET del_flag = 'Y'
+        <where>
+            AND id = #{id}
+        </where>
+    </update>
 
-	<update id="deleteByRoleId">
-		UPDATE power_info SET del_flag = 'Y'
-		<where>
-			AND role_id = #{roleId}
-		</where>
-	</update>
+    <update id="deleteByRoleId">
+        UPDATE sys_power_info SET del_flag = 'Y'
+        <where>
+            AND role_id = #{roleId}
+        </where>
+    </update>
 </mapper>
 

+ 9 - 9
src/main/java/com/izouma/awesomeadmin/dao/QueryConfigMapper.xml

@@ -37,16 +37,16 @@
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer">
         select
         <include refid="Base_Column_List"/>
-        from query_config
+        from sys_query_config
         where id = #{id,jdbcType=INTEGER}
     </select>
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
-        delete from query_config
+        delete from sys_query_config
         where id = #{id,jdbcType=INTEGER}
     </delete>
     <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.QueryConfig" useGeneratedKeys="true"
             keyProperty="id">
-        insert into query_config
+        insert into sys_query_config
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="id!= null">
                 id,
@@ -107,7 +107,7 @@
         </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.QueryConfig">
-        update query_config
+        update sys_query_config
         <set>
             <if test="id != null">
                 id= #{id,jdbcType=INTEGER},
@@ -143,7 +143,7 @@
             resultType="com.izouma.awesomeadmin.model.QueryConfig">
         select
         <include refid="Base_Column_List"/>
-        from query_config
+        from sys_query_config
         <where>
             and del_flag = 'N'
             <if test="record.id != null and !&quot;&quot;.equals(record.id)">
@@ -218,7 +218,7 @@
             resultType="com.izouma.awesomeadmin.model.QueryConfig">
         select
         <include refid="Base_Column_List"/>
-        from query_config
+        from sys_query_config
         <where>
             and del_flag = 'N'
             <if test="id != null and !&quot;&quot;.equals(id)">
@@ -290,7 +290,7 @@
     <select id="queryQueryConfig" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.QueryConfig">
         select
         <include refid="Base_Column_List"/>
-        from query_config
+        from sys_query_config
         <where>
             and del_flag = 'N'
             <if test="id != null and !&quot;&quot;.equals(id)">
@@ -319,7 +319,7 @@
         LIMIT 1
     </select>
     <update id="delete">
-        UPDATE query_config SET del_flag = 'Y'
+        UPDATE sys_query_config SET del_flag = 'Y'
         <where>
             AND id = #{id}
         </where>
@@ -327,7 +327,7 @@
     <select id="query" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.QueryConfig">
         select
         <include refid="Base_Column_List"/>
-        from query_config
+        from sys_query_config
         <where>
             and del_flag = 'N'
         </where>

+ 7 - 7
src/main/java/com/izouma/awesomeadmin/dao/RongYunTokenMapper.xml

@@ -14,24 +14,24 @@
     <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">
         select
         <include refid="Base_Column_List"/>
-        from rong_yun_token
+        from sys_rong_yun_token
         where id = #{id,jdbcType=BIGINT}
     </select>
 
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
-        delete from rong_yun_token
+        delete from sys_rong_yun_token
         where id = #{id,jdbcType=BIGINT}
     </delete>
 
     <insert id="insert" parameterType="com.izouma.awesomeadmin.model.RongYunToken" useGeneratedKeys="true"
             keyProperty="id">
-        insert into rong_yun_token (id, user_id, token)
+        insert into sys_rong_yun_token (id, user_id, token)
         values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{token,jdbcType=VARCHAR})
     </insert>
 
     <insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.RongYunToken" useGeneratedKeys="true"
             keyProperty="id">
-        insert into rong_yun_token
+        insert into sys_rong_yun_token
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="id != null">
                 id,
@@ -57,7 +57,7 @@
     </insert>
 
     <update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.RongYunToken">
-        update rong_yun_token
+        update sys_rong_yun_token
         <set>
             <if test="userId != null">
                 user_id = #{userId,jdbcType=BIGINT},
@@ -70,7 +70,7 @@
     </update>
 
     <update id="updateByPrimaryKey" parameterType="com.izouma.awesomeadmin.model.RongYunToken">
-        update rong_yun_token
+        update sys_rong_yun_token
         set user_id = #{userId,jdbcType=BIGINT},
             token = #{token,jdbcType=VARCHAR}
         where id = #{id,jdbcType=BIGINT}
@@ -79,7 +79,7 @@
     <select id="getRongToken" resultType="com.izouma.awesomeadmin.model.RongYunToken" parameterType="string">
 		SELECT
 		*
-		FROM rong_yun_token
+		FROM sys_rong_yun_token
 		WHERE user_id = #{rongKey}
 		order by id desc
 		LIMIT 1

+ 7 - 7
src/main/java/com/izouma/awesomeadmin/dao/SuperUserMapper.xml

@@ -9,7 +9,7 @@
     <select id="queryUserById" resultType="com.izouma.awesomeadmin.model.SuperUser" parameterType="string">
         SELECT
         <include refid="columns"/>
-        FROM super_user
+        FROM sys_super_user
         WHERE user_id = #{userId}
         LIMIT 1
     </select>
@@ -17,7 +17,7 @@
     <select id="userLogin" resultType="com.izouma.awesomeadmin.model.SuperUser" parameterType="map">
         SELECT
         <include refid="columns"/>
-        FROM super_user
+        FROM sys_super_user
         WHERE user_name = #{username}
         and password = #{password}
         LIMIT 1
@@ -26,7 +26,7 @@
     <select id="queryAllUsers" resultType="com.izouma.awesomeadmin.model.SuperUser">
         SELECT
         <include refid="columns"/>
-        FROM super_user
+        FROM sys_super_user
         where del_flag = 'N'
         order by user_id
         <!-- 为了测试只取100个 -->
@@ -36,7 +36,7 @@
     <select id="queryAllUsersByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.SuperUser">
         select
         <include refid="columns"/>
-        from super_user
+        from sys_super_user
         <where>
             <!--  
             <if test="userInfo.userId != null and !&quot;&quot;.equals(userInfo.userId)">
@@ -51,12 +51,12 @@
     </select>
 
     <insert id="save" parameterType="com.izouma.awesomeadmin.model.SuperUser" useGeneratedKeys="true" keyProperty="id">
-	    INSERT INTO super_user (user_name, power, password, profile)
+	    INSERT INTO sys_super_user (user_name, power, password, profile)
         VALUES (#{username}, #{power}, #{password}, #{profile})
     </insert>
 
     <update id="updateUserInfo">
-        UPDATE super_user
+        UPDATE sys_super_user
         <trim prefix="SET" suffixOverrides=",">
             <if test="userInfo.userId != null">
                 user_Id = #{userInfo.userId},
@@ -80,7 +80,7 @@
     </update>
 
     <update id="delete">
-        UPDATE super_user SET del_flag = 'Y'
+        UPDATE sys_super_user SET del_flag = 'Y'
         <where>
             AND user_id = #{userId}
         </where>

+ 8 - 8
src/main/java/com/izouma/awesomeadmin/dao/TableFieldMapper.xml

@@ -32,15 +32,15 @@
 	<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
 		select
 		<include refid="Base_Column_List" />
-		from table_field
+		from sys_table_field
 		where id = #{id,jdbcType=INTEGER}
 	</select>
 	<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
-		delete from table_field
+		delete from sys_table_field
 		where id = #{id,jdbcType=INTEGER}
 	</delete>
 	<insert id="insertSelective" parameterType="com.izouma.awesomeadmin.model.TableField" useGeneratedKeys="true" keyProperty="id">
-		insert into table_field
+		insert into sys_table_field
 		<trim prefix="(" suffix=")" suffixOverrides="," >
 			<if test="id != null" >
 				id,	
@@ -185,7 +185,7 @@
 		</trim>
 	</insert>
 	<update id="updateByPrimaryKeySelective" parameterType="com.izouma.awesomeadmin.model.TableField" >
-		update table_field
+		update sys_table_field
 		<set >
 			<if test="name != null" >
 				name = #{name,jdbcType=VARCHAR},	
@@ -257,7 +257,7 @@
 		where id = #{id,jdbcType=INTEGER}
 	</update>
 	<select id="queryTableFieldsByPage" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TableField">
-		select <include refid="Base_Column_List"/> from table_field
+		select <include refid="Base_Column_List"/> from sys_table_field
 		<where>
 			and del_flag = 'N'
 			<if test="record.id != null and !&quot;&quot;.equals(record.id)">
@@ -333,7 +333,7 @@
 		order by id desc
 	</select>
 	<select id="queryAllTableField" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TableField">
-		select <include refid="Base_Column_List"/> from table_field
+		select <include refid="Base_Column_List"/> from sys_table_field
 		<where>
 			and del_flag = 'N'
 			<if test="id != null and !&quot;&quot;.equals(id)">
@@ -409,7 +409,7 @@
 		order by id desc
 	</select>
 	<select id="queryTableField" parameterType="java.util.Map" resultType="com.izouma.awesomeadmin.model.TableField">
-		select <include refid="Base_Column_List"/> from table_field
+		select <include refid="Base_Column_List"/> from sys_table_field
 		<where>
 			and del_flag = 'N'
 			<if test="id != null and !&quot;&quot;.equals(id)">
@@ -485,7 +485,7 @@
 		LIMIT 1
 	</select>
 	<update id="delete">
-		UPDATE table_field SET del_flag = 'Y'
+		UPDATE sys_table_field SET del_flag = 'Y'
 		<where>
 			AND id = #{id}
 		</where>

+ 4 - 1
src/main/java/com/izouma/awesomeadmin/util/DatabaseUtil.java

@@ -58,7 +58,10 @@ public class DatabaseUtil {
             ResultSet rs = stmt.executeQuery(sql);
             while (rs.next()) {
 
-                if (!rs.getString(1).startsWith("ACT_") && !rs.getString(1).startsWith("act_")) {
+                if (!rs.getString(1).startsWith("ACT_")
+                        && !rs.getString(1).startsWith("act_")
+                        && !rs.getString(1).startsWith("sys_")
+                        && !rs.getString(1).startsWith("SYS_")) {
 
                     tables.add(rs.getString(1));
                 }