Procházet zdrojové kódy

Merge branch '1.0' of 192.168.2.80:/srv/git/pre_parameter into 1.0

zjh před 2 roky
rodič
revize
3d7d3efd54

binární
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/sysApp/SysApp.java


binární
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/sysApp/SysInstitution.java


binární
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/sysMange/AssociationDTO.java


binární
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/sysMange/AssociationVo.java


binární
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/common/utils/CreateCode.java


binární
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/controller/sysApp/SysAppController.java


binární
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/mapper/sysApp/SysAppMapper.java


binární
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/parameter/smartPrescrib/ToolbarService.java


binární
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/sysApp/SysAppService.java


+ 77 - 51
cbkj_web_parameter/src/main/resources/mappers/sysApp/SysAppMapper.xml

@@ -3,76 +3,86 @@
 <mapper namespace="com.jiuzhekan.cbkj.mapper.sysApp.SysAppMapper">
 
     <resultMap id="BaseResultMap" type="com.jiuzhekan.cbkj.beans.sysApp.SysApp">
-        <id column="app_id" jdbcType="VARCHAR"  property="appId" />
-        <result column="app_name" jdbcType="VARCHAR" property="appName" />
-        <result column="app_pwd" jdbcType="VARCHAR" property="appPwd" />
-        <result column="app_desc" jdbcType="VARCHAR" property="appDesc" />
-        <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
-        <result column="create_user" jdbcType="VARCHAR" property="createUser" />
-        <result column="create_user_name" jdbcType="VARCHAR" property="createUsername" />
-        <result column="status" jdbcType="VARCHAR" property="status" />
-        <result column="platform_code" jdbcType="VARCHAR" property="platformCode" />
-
-
+        <id column="app_id" jdbcType="VARCHAR" property="appId"/>
+        <result column="app_name" jdbcType="VARCHAR" property="appName"/>
+        <result column="app_pwd" jdbcType="VARCHAR" property="appPwd"/>
+        <result column="app_desc" jdbcType="VARCHAR" property="appDesc"/>
+        <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
+        <result column="create_user" jdbcType="VARCHAR" property="createUser"/>
+        <result column="create_user_name" jdbcType="VARCHAR" property="createUserName"/>
+        <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
+        <result column="update_user" jdbcType="VARCHAR" property="updateUser"/>
+        <result column="update_user_name" jdbcType="VARCHAR" property="updateUserName"/>
+        <result column="status" jdbcType="VARCHAR" property="status"/>
+        <result column="sort" jdbcType="INTEGER" property="sort"/>
+        <result column="platform_code" jdbcType="VARCHAR" property="platformCode"/>
     </resultMap>
 
 
     <sql id="Base_Column_List">
-    app_id,app_name,app_pwd,app_desc,create_date,create_user,create_user_name,status,platform_code
+        app_id,app_name,app_pwd,app_desc,create_date,create_user,create_user_name,
+        update_date,update_user,update_user_name,sort,status,platform_code
     </sql>
 
     <delete id="deleteByPrimaryKey" parameterType="SysApp">
-        delete from sys_app where app_id = #{ appId }
+        delete
+        from sys_app
+        where app_id = #{ appId }
     </delete>
 
     <!--根据主键批量删除-->
     <delete id="deleteBylist" parameterType="ArrayList">
         delete from sys_app where app_id in
         <foreach collection="array" item="item" open="(" separator="," close=")">
-        #{item}
+            #{item}
         </foreach>
     </delete>
 
     <!--单个插入-->
-    <insert id="insert"  parameterType="SysApp">
-        insert into sys_app (app_id,app_name,app_pwd,app_desc,create_date,create_user,create_user_name,status,platform_code) values
-        (#{appId},#{appName},#{appPwd},#{appDesc},#{createDate},#{createUser},#{createUsername},#{status},#{platformCode})
+    <insert id="insert" parameterType="SysApp">
+        insert into sys_app (app_id, app_name, app_pwd, app_desc, create_date, create_user, create_user_name, status,update_date,update_user,update_user_name,
+                            sort, platform_code)
+        values (#{appId}, #{appName}, #{appPwd}, #{appDesc}, #{createDate}, #{createUser}, #{createUserName}, #{status},#{updateDate},#{updateUser},#{updateUserName},
+                #{sort},  #{platformCode})
     </insert>
 
     <!--批量插入-->
     <insert id="insertList" parameterType="List">
-        insert into sys_app (app_id,app_name,app_pwd,app_desc,create_date,create_user,create_user_name,status,platform_code) values
-        <foreach collection="list" item="item" index="index" separator="," >
-            (#{item.appId},#{item.appName},#{item.appPwd},#{item.appDesc},#{item.createDate},#{item.createUser},#{item.createUsername},
-            #{item.status},#{item.platformCode})
+        insert into sys_app
+        (app_id,app_name,app_pwd,app_desc,create_date,create_user,create_user_name,update_date,update_user,update_user_name,status,sort,platform_code) values
+        <foreach collection="list" item="item" index="index" separator=",">
+            (#{item.appId},#{item.appName},#{item.appPwd},#{item.appDesc},#{item.createDate},#{item.createUser},#{item.createUserName},#{item.updateDate},#{item.updateUser},#{item.updateUserName},
+            #{item.status},#{sort},#{item.platformCode})
         </foreach>
     </insert>
 
     <update id="updateByPrimaryKey" parameterType="SysApp">
         update sys_app
         <set>
-             <if test="appName != null">
+            <if test="appName != null">
                 app_name = #{ appName },
-             </if>
-             <if test="appPwd != null">
+            </if>
+            <if test="appPwd != null">
                 app_pwd = #{ appPwd },
-             </if>
-             <if test="appDesc != null">
+            </if>
+            <if test="appDesc != null">
                 app_desc = #{ appDesc },
-             </if>
-             <if test="createDate != null">
-                create_date = #{ createDate },
-             </if>
-             <if test="createUser != null">
-                create_user = #{ createUser },
-             </if>
-             <if test="createUsername != null">
-                create_user_name = #{ createUsername },
-             </if>
-
+            </if>
+            <if test="updateDate != null">
+                update_date = #{updateDate},
+            </if>
+            <if test="updateUser != null">
+                update_user = #{updateUser},
+            </if>
+            <if test="updateUserName != null">
+                update_user_name = #{updateUserName},
+            </if>
             <if test="status != null">
                 status = #{status},
             </if>
+            <if test="sort != null">
+                sort = #{sort},
+            </if>
 
             <if test="platformCode != null">
                 platform_code = #{platformCode},
@@ -90,8 +100,8 @@
         <if test="filed4!=null and filed4!=''">,${filed4}=#{filedValue4}</if>
         <!-- 可扩展 -->
         where 1=1
-        <if test="key1!=null and key1!=''"> and ${key1}=#{value1} </if>
-        <if test="key2!=null and key2!=''"> and ${key2}=#{value2} </if>
+        <if test="key1!=null and key1!=''">and ${key1}=#{value1}</if>
+        <if test="key2!=null and key2!=''">and ${key2}=#{value2}</if>
         <!-- 可扩展 -->
     </update>
 
@@ -112,45 +122,61 @@
     </select>
 
     <select id="getMapById" resultType="Map" parameterType="String">
-        select <include refid="Base_Column_List" />
+        select
+        <include refid="Base_Column_List"/>
         from sys_app where app_id = #{id}
     </select>
 
     <select id="getObjectById" resultMap="BaseResultMap" parameterType="String">
-        select <include refid="Base_Column_List" />
+        select
+        <include refid="Base_Column_List"/>
         from sys_app where app_id = #{id}
     </select>
 
     <!--分页查询基础语句返回Map-->
     <select id="getPageDatas" parameterType="SysApp" resultType="Map">
-        SELECT app_id,app_name,app_pwd,app_desc,create_date,create_user,create_user_name  from sys_app
-        where 1=1
+        SELECT app_id, app_name, app_pwd, app_desc, create_date, create_user, create_user_name
+        from sys_app
+        where 1 = 1
     </select>
 
 
     <!--分页查询基础语句返回对象-->
     <select id="getPageListByObj" parameterType="SysApp" resultMap="BaseResultMap">
-        SELECT app_id,app_name,app_pwd,app_desc,create_date,create_user,create_user_name
+        SELECT app_id,app_name,sort,app_desc,update_date,update_user,update_user_name
         from sys_app
-        where 1=1 and IS_DEL ='0'
+        where 1=1
         <!--条件-->
         <if test="appName != null and appName!='' ">
-        and app_name like CONCAT('%',trim(#{appName}),'%')
+            and app_name like CONCAT('%',trim(#{appName}),'%')
         </if>
-        order by create_date desc
+        order by sort asc
     </select>
+
+    <select id="getPageAssocation" parameterType="SysApp" resultMap="BaseResultMap">
+        SELECT app_id,app_name,sort,status,app_desc,update_date,update_user,update_user_name
+        from sys_app
+        where 1=1
+        <!--条件-->
+        <if test="appName != null and appName!='' ">
+            and app_name like CONCAT('%',trim(#{appName}),'%')
+        </if>
+        order by sort asc
+    </select>
+
     <select id="getApplist" parameterType="SysApp" resultMap="BaseResultMap">
-        SELECT app_id,app_name
+        SELECT
+        <include refid="Base_Column_List"/>
         from sys_app
-        where  IS_DEL = '0' and IS_DISABLE = '0'
+        where status = '1'
         <if test="appId != null  and appId!=''">
-           and app_id = #{ appId }
+            and app_id = #{ appId }
         </if>
     </select>
 
     <select id="getMaxAppId" resultType="String">
         SELECT app_id
         from sys_app
-        ORDER BY app_id desc  LIMIT 0,1
+        ORDER BY app_id desc LIMIT 0,1
     </select>
 </mapper>

+ 217 - 147
cbkj_web_parameter/src/main/resources/mappers/sysApp/SysInstitutionMapper.xml

@@ -3,176 +3,207 @@
 <mapper namespace="com.jiuzhekan.cbkj.mapper.sysApp.SysInstitutionMapper">
 
     <resultMap id="BaseResultMap" type="com.jiuzhekan.cbkj.beans.sysApp.SysInstitution">
-        <id column="INS_ID" jdbcType="VARCHAR"  property="insId" />
-        <result column="APP_ID" jdbcType="VARCHAR" property="appId" />
-        <result column="INS_CODE" jdbcType="VARCHAR" property="insCode" />
-        <result column="INS_NAME" jdbcType="VARCHAR" property="insName" />
-        <result column="ins_parent_code" jdbcType="VARCHAR" property="insParentCode" />
-        <result column="INS_CATEGORY" jdbcType="VARCHAR" property="insCategory" />
-        <result column="INS_IS_LAST" jdbcType="INTEGER" property="insIslast" />
-        <result column="INS_PINYIN" jdbcType="VARCHAR" property="insPinyin" />
-        <result column="INS_WUBI" jdbcType="VARCHAR" property="insWubi" />
-        <result column="province_code" jdbcType="VARCHAR" property="provinceCode" />
-        <result column="province_name" jdbcType="VARCHAR" property="provinceName" />
-        <result column="city_code" jdbcType="VARCHAR" property="cityCode" />
-        <result column="city_name" jdbcType="VARCHAR" property="cityName" />
-        <result column="area_code" jdbcType="VARCHAR" property="areaCode" />
-        <result column="area_name" jdbcType="VARCHAR" property="areaName" />
-        <result column="street_code" jdbcType="VARCHAR" property="streetCode" />
-        <result column="street_name" jdbcType="VARCHAR" property="streetName" />
-        <result column="INS_ADDRESS" jdbcType="VARCHAR" property="insAddress" />
-        <result column="INS_ISONLINE" jdbcType="VARCHAR" property="insIsonline" />
-        <result column="SORT" jdbcType="INTEGER" property="sort" />
-        <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
-        <result column="CREATE_USER" jdbcType="VARCHAR" property="createUser" />
-        <result column="create_user_name" jdbcType="VARCHAR" property="createUsername" />
-        <result column="status" jdbcType="VARCHAR" property="status" />
-        <result column="INS_PNAME" jdbcType="VARCHAR" property="insPname" />
-        <result column="APP_NAME" jdbcType="VARCHAR" property="appName" />
-        <result column="platform_code" jdbcType="VARCHAR" property="platformCode" />
-        <result column="ins_level" jdbcType="VARCHAR" property="insLevel" />
+        <id column="INS_ID" jdbcType="VARCHAR" property="insId"/>
+        <result column="APP_ID" jdbcType="VARCHAR" property="appId"/>
+        <result column="INS_CODE" jdbcType="VARCHAR" property="insCode"/>
+        <result column="INS_NAME" jdbcType="VARCHAR" property="insName"/>
+        <result column="ins_parent_code" jdbcType="VARCHAR" property="insParentCode"/>
+        <result column="INS_CATEGORY" jdbcType="VARCHAR" property="insCategory"/>
+        <result column="INS_IS_LAST" jdbcType="INTEGER" property="insIslast"/>
+        <result column="INS_PINYIN" jdbcType="VARCHAR" property="insPinyin"/>
+        <result column="INS_WUBI" jdbcType="VARCHAR" property="insWubi"/>
+        <result column="province_code" jdbcType="VARCHAR" property="provinceCode"/>
+        <result column="province_name" jdbcType="VARCHAR" property="provinceName"/>
+        <result column="city_code" jdbcType="VARCHAR" property="cityCode"/>
+        <result column="city_name" jdbcType="VARCHAR" property="cityName"/>
+        <result column="area_code" jdbcType="VARCHAR" property="areaCode"/>
+        <result column="area_name" jdbcType="VARCHAR" property="areaName"/>
+        <result column="street_code" jdbcType="VARCHAR" property="streetCode"/>
+        <result column="street_name" jdbcType="VARCHAR" property="streetName"/>
+        <result column="INS_ADDRESS" jdbcType="VARCHAR" property="insAddress"/>
+        <result column="INS_ISONLINE" jdbcType="VARCHAR" property="insIsonline"/>
+        <result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
+        <result column="CREATE_USER" jdbcType="VARCHAR" property="createUser"/>
+        <result column="create_user_name" jdbcType="VARCHAR" property="createUsername"/>
+        <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/>
+        <result column="update_user" jdbcType="VARCHAR" property="updateUser"/>
+        <result column="update_user_name" jdbcType="VARCHAR" property="updateUserName"/>
+        <result column="sort" jdbcType="VARCHAR" property="sort"/>
+        <result column="status" jdbcType="VARCHAR" property="status"/>
+        <result column="INS_PNAME" jdbcType="VARCHAR" property="insPname"/>
+        <result column="APP_NAME" jdbcType="VARCHAR" property="appName"/>
+        <result column="platform_code" jdbcType="VARCHAR" property="platformCode"/>
+        <result column="ins_level" jdbcType="VARCHAR" property="insLevel"/>
     </resultMap>
 
     <resultMap id="BaseResultMap2" type="com.jiuzhekan.cbkj.beans.sysApp.SysInstitution">
-        <id column="INS_ID" jdbcType="VARCHAR"  property="insId" />
-        <result column="APP_ID" jdbcType="VARCHAR" property="appId" />
-        <result column="INS_CODE" jdbcType="VARCHAR" property="insCode" />
-        <result column="INS_NAME" jdbcType="VARCHAR" property="insName" />
-        <result column="ins_parent_code" jdbcType="VARCHAR" property="insParentCode" />
-        <result column="INS_IS_LAST" jdbcType="INTEGER" property="insIslast" />
-        <result column="INS_ISONLINE" jdbcType="VARCHAR" property="insIsonline" />
+        <id column="INS_ID" jdbcType="VARCHAR" property="insId"/>
+        <result column="APP_ID" jdbcType="VARCHAR" property="appId"/>
+        <result column="INS_CODE" jdbcType="VARCHAR" property="insCode"/>
+        <result column="INS_NAME" jdbcType="VARCHAR" property="insName"/>
+        <result column="ins_parent_code" jdbcType="VARCHAR" property="insParentCode"/>
+        <result column="INS_IS_LAST" jdbcType="INTEGER" property="insIslast"/>
+        <result column="INS_ISONLINE" jdbcType="VARCHAR" property="insIsonline"/>
         <collection property="insList" ofType="com.jiuzhekan.cbkj.beans.sysApp.SysInstitution">
-            <id column="INS_ID2" jdbcType="VARCHAR"  property="insId" />
-            <result column="APP_ID2" jdbcType="VARCHAR" property="appId" />
-            <result column="INS_CODE2" jdbcType="VARCHAR" property="insCode" />
-            <result column="INS_NAME2" jdbcType="VARCHAR" property="insName" />
-            <result column="INS_PCODE2" jdbcType="VARCHAR" property="insParentCode" />
-            <result column="INS_ISLAST2" jdbcType="INTEGER" property="insIslast" />
-            <result column="INS_ISONLINE2" jdbcType="VARCHAR" property="insIsonline" />
+            <id column="INS_ID2" jdbcType="VARCHAR" property="insId"/>
+            <result column="APP_ID2" jdbcType="VARCHAR" property="appId"/>
+            <result column="INS_CODE2" jdbcType="VARCHAR" property="insCode"/>
+            <result column="INS_NAME2" jdbcType="VARCHAR" property="insName"/>
+            <result column="INS_PCODE2" jdbcType="VARCHAR" property="insParentCode"/>
+            <result column="INS_ISLAST2" jdbcType="INTEGER" property="insIslast"/>
+            <result column="INS_ISONLINE2" jdbcType="VARCHAR" property="insIsonline"/>
             <collection property="insList" ofType="com.jiuzhekan.cbkj.beans.sysApp.SysInstitution">
-                <id column="INS_ID3" jdbcType="VARCHAR"  property="insId" />
-                <result column="APP_ID3" jdbcType="VARCHAR" property="appId" />
-                <result column="INS_CODE3" jdbcType="VARCHAR" property="insCode" />
-                <result column="INS_NAME3" jdbcType="VARCHAR" property="insName" />
-                <result column="INS_PCODE3" jdbcType="VARCHAR" property="insParentCode" />
-                <result column="INS_ISLAST3" jdbcType="INTEGER" property="insIslast" />
-                <result column="INS_ISONLINE3" jdbcType="VARCHAR" property="insIsonline" />
+                <id column="INS_ID3" jdbcType="VARCHAR" property="insId"/>
+                <result column="APP_ID3" jdbcType="VARCHAR" property="appId"/>
+                <result column="INS_CODE3" jdbcType="VARCHAR" property="insCode"/>
+                <result column="INS_NAME3" jdbcType="VARCHAR" property="insName"/>
+                <result column="INS_PCODE3" jdbcType="VARCHAR" property="insParentCode"/>
+                <result column="INS_ISLAST3" jdbcType="INTEGER" property="insIslast"/>
+                <result column="INS_ISONLINE3" jdbcType="VARCHAR" property="insIsonline"/>
             </collection>
         </collection>
     </resultMap>
 
 
-
     <sql id="Base_Column_List">
-    INS_ID,APP_ID,INS_CODE,INS_NAME,ins_parent_code,INS_CATEGORY,INS_IS_LAST,INS_PINYIN,INS_WUBI,province_code,province_name,city_code,city_name,area_code,area_name,street_code,street_name,INS_ADDRESS,INS_ISONLINE,SORT,CREATE_DATE,CREATE_USER,create_user_name,status,platform_code,ins_level
+        INS_ID
+        ,APP_ID,INS_CODE,INS_NAME,ins_parent_code,INS_CATEGORY,INS_IS_LAST,INS_PINYIN,INS_WUBI,province_code,province_name,city_code,city_name,area_code,area_name,street_code,street_name,INS_ADDRESS,INS_ISONLINE,SORT,CREATE_DATE,CREATE_USER,create_user_name,status,platform_code,ins_level
     </sql>
 
     <delete id="deleteByPrimaryKey" parameterType="SysInstitution">
-        delete from sys_institution where INS_ID = #{ insId }
+        delete
+        from sys_institution
+        where INS_ID = #{ insId }
     </delete>
 
     <!--根据主键批量删除-->
     <delete id="deleteBylist" parameterType="ArrayList">
         delete from sys_institution where INS_ID in
         <foreach collection="array" item="item" open="(" separator="," close=")">
-        #{item}
+            #{item}
         </foreach>
     </delete>
 
     <!--单个插入-->
-    <insert id="insert"  parameterType="SysInstitution">
-        insert into sys_institution (INS_ID,APP_ID,INS_CODE,INS_NAME,ins_parent_code,INS_CATEGORY,INS_IS_LAST,INS_PINYIN,INS_WUBI,province_code,province_name,city_code,city_name,area_code,area_name,street_code,street_name,INS_ADDRESS,INS_ISONLINE,SORT,CREATE_DATE,CREATE_USER,create_user_name,status,platform_code,ins_level) values
-        (#{insId},#{appId},#{insCode},#{insName},#{insParentCode},#{insCategory},#{insIslast},#{insPinyin},#{insWubi},#{provinceCode},#{provinceName},#{cityCode},#{cityName},#{areaCode},#{areaName},#{streetCode},#{streetName},#{insAddress},#{insIsonline},#{sort},#{createDate},#{createUser},#{createUsername},#{status},#{platformCode},#{insLevel})
+    <insert id="insert" parameterType="SysInstitution">
+        insert into sys_institution (INS_ID, APP_ID, INS_CODE, INS_NAME, ins_parent_code, INS_CATEGORY, INS_IS_LAST,
+                                     INS_PINYIN, INS_WUBI, province_code, province_name, city_code, city_name,
+                                     area_code, area_name, street_code, street_name, INS_ADDRESS, INS_ISONLINE, SORT,
+                                     CREATE_DATE, CREATE_USER, create_user_name, update_date, update_user,
+                                     update_user_name, status, platform_code, ins_level)
+        values (#{insId}, #{appId}, #{insCode}, #{insName}, #{insParentCode}, #{insCategory}, #{insIslast},
+                #{insPinyin}, #{insWubi}, #{provinceCode}, #{provinceName}, #{cityCode}, #{cityName}, #{areaCode},
+                #{areaName}, #{streetCode}, #{streetName}, #{insAddress}, #{insIsonline}, #{sort}, #{createDate},
+                #{createUser}, #{createUsername}, #{updateDate}, #{updateUser}, #{updateUserName}, #{status},
+                #{platformCode}, #{insLevel})
     </insert>
 
     <!--批量插入-->
     <insert id="insertList" parameterType="List">
-        insert into sys_institution (INS_ID,APP_ID,INS_CODE,INS_NAME,ins_parent_code,INS_CATEGORY,INS_IS_LAST,INS_PINYIN,INS_WUBI,province_code,province_name,city_code,city_name,area_code,area_name,street_code,street_name,INS_ADDRESS,INS_ISONLINE,SORT,CREATE_DATE,CREATE_USER,create_user_name,status) values
-        <foreach collection="list" item="item" index="index" separator="," >
-            (#{item.insId},#{item.appId},#{item.insCode},#{item.insName},#{item.insParentCode},#{item.insCategory},#{item.insIslast},#{item.insPinyin},#{item.insWubi},#{item.provinceCode},#{item.provinceName},#{item.cityCode},#{item.cityName},#{item.areaCode},#{item.areaName},#{item.streetCode},#{item.streetName},#{item.insAddress},#{item.insIsonline},#{item.sort},#{item.createDate},#{item.createUser},#{item.createUsername},#{item.status},#{item.platformCode},#{item.insLevel})
+        insert into sys_institution
+        (INS_ID,APP_ID,INS_CODE,INS_NAME,ins_parent_code,INS_CATEGORY,INS_IS_LAST,INS_PINYIN,INS_WUBI,province_code,province_name,city_code,city_name,area_code,area_name,street_code,street_name,INS_ADDRESS,INS_ISONLINE,SORT,
+        CREATE_DATE,CREATE_USER,create_user_name,
+        update_date, update_user,
+        update_user_name,
+        status)
+        values
+        <foreach collection="list" item="item" index="index" separator=",">
+            (#{item.insId},#{item.appId},#{item.insCode},#{item.insName},#{item.insParentCode},#{item.insCategory},#{item.insIslast},#{item.insPinyin},#{item.insWubi},#{item.provinceCode},#{item.provinceName},#{item.cityCode},#{item.cityName},#{item.areaCode},#{item.areaName},#{item.streetCode},#{item.streetName},#{item.insAddress},#{item.insIsonline},#{item.sort},#{item.createDate},#{item.createUser},#{item.createUsername},
+            #{item.updateDate}, #{item.updateUser}, #{item.updateUserName},
+             #{item.status},#{item.platformCode},#{item.insLevel})
         </foreach>
     </insert>
 
     <update id="updateByPrimaryKey" parameterType="SysInstitution">
         update sys_institution
         <set>
-             <if test="appId != null">
+            <if test="appId != null">
                 APP_ID = #{ appId },
-             </if>
-             <if test="insCode != null">
+            </if>
+            <if test="insCode != null">
                 INS_CODE = #{ insCode },
-             </if>
-             <if test="insName != null">
+            </if>
+            <if test="insName != null">
                 INS_NAME = #{ insName },
-             </if>
-             <if test="insParentCode != null">
+            </if>
+            <if test="insParentCode != null">
                 ins_parent_code = #{ insParentCode },
-             </if>
-             <if test="insCategory != null">
+            </if>
+            <if test="insCategory != null">
                 INS_CATEGORY = #{ insCategory },
-             </if>
-             <if test="insIslast != null">
+            </if>
+            <if test="insIslast != null">
                 INS_IS_LAST = #{ insIslast },
-             </if>
-             <if test="insPinyin != null">
+            </if>
+            <if test="insPinyin != null">
                 INS_PINYIN = #{ insPinyin },
-             </if>
-             <if test="insWubi != null">
+            </if>
+            <if test="insWubi != null">
                 INS_WUBI = #{ insWubi },
-             </if>
-             <if test="provinceCode != null">
+            </if>
+            <if test="provinceCode != null">
                 province_code = #{ provinceCode },
-             </if>
-             <if test="provinceName != null">
+            </if>
+            <if test="provinceName != null">
                 province_name = #{ provinceName },
-             </if>
-             <if test="cityCode != null">
+            </if>
+            <if test="cityCode != null">
                 city_code = #{ cityCode },
-             </if>
-             <if test="cityName != null">
+            </if>
+            <if test="cityName != null">
                 city_name = #{ cityName },
-             </if>
-             <if test="areaCode != null">
+            </if>
+            <if test="areaCode != null">
                 area_code = #{ areaCode },
-             </if>
-             <if test="areaName != null">
+            </if>
+            <if test="areaName != null">
                 area_name = #{ areaName },
-             </if>
-             <if test="streetCode != null">
-                 street_code = #{ streetCode },
-             </if>
-             <if test="streetName != null">
-                 street_name = #{ streetName },
-             </if>
-             <if test="insAddress != null">
+            </if>
+            <if test="streetCode != null">
+                street_code = #{ streetCode },
+            </if>
+            <if test="streetName != null">
+                street_name = #{ streetName },
+            </if>
+            <if test="insAddress != null">
                 INS_ADDRESS = #{ insAddress },
-             </if>
-             <if test="insIsonline != null">
+            </if>
+            <if test="insIsonline != null">
                 INS_ISONLINE = #{ insIsonline },
-             </if>
-             <if test="sort != null">
+            </if>
+            <if test="sort != null">
                 SORT = #{ sort },
-             </if>
-             <if test="createDate != null">
+            </if>
+            <if test="createDate != null">
                 CREATE_DATE = #{ createDate },
-             </if>
-             <if test="createUser != null">
+            </if>
+            <if test="createUser != null">
                 CREATE_USER = #{ createUser },
-             </if>
-             <if test="createUsername != null">
+            </if>
+            <if test="createUsername != null">
                 create_user_name = #{ createUsername },
-             </if>
+            </if>
 
-             <if test="status != null">
+            <if test="updateDate != null">
+                update_date = #{updateDate},
+            </if>
+            <if test="updateUser != null">
+                update_user = #{updateUser},
+            </if>
+            <if test="updateUserName != null">
+                update_user_name = #{updateUserName},
+            </if>
+
+            <if test="status != null">
                 status = #{ status },
-             </if>
+            </if>
 
             <if test="platformCode != null">
                 platform_code = #{platformCode},
-             </if>
+            </if>
             <if test="insLevel != null">
                 ins_level = #{insLevel},
-             </if>
+            </if>
 
         </set>
         where INS_ID = #{ insId }
@@ -186,8 +217,8 @@
         <if test="filed4!=null and filed4!=''">,${filed4}=#{filedValue4}</if>
         <!-- 可扩展 -->
         where 1=1
-        <if test="key1!=null and key1!=''"> and ${key1}=#{value1} </if>
-        <if test="key2!=null and key2!=''"> and ${key2}=#{value2} </if>
+        <if test="key1!=null and key1!=''">and ${key1}=#{value1}</if>
+        <if test="key2!=null and key2!=''">and ${key2}=#{value2}</if>
         <!-- 可扩展 -->
     </update>
 
@@ -208,32 +239,60 @@
     </select>
 
     <select id="getMapById" resultType="Map" parameterType="String">
-        select <include refid="Base_Column_List" />
+        select
+        <include refid="Base_Column_List"/>
         from sys_institution where INS_ID = #{id} and status='1'
     </select>
 
     <select id="getObjectById" resultMap="BaseResultMap" parameterType="String">
-        SELECT ins.*,(SELECT INS_NAME FROM sys_institution WHERE INS_CODE = ins.ins_parent_code limit 1) as INS_PNAME
+        SELECT ins.*, (SELECT INS_NAME FROM sys_institution WHERE INS_CODE = ins.ins_parent_code limit 1) as INS_PNAME
         from sys_institution ins
         where ins.INS_ID = #{id} and ins.status='1'
     </select>
 
     <!--分页查询基础语句返回Map-->
     <select id="getPageDatas" parameterType="SysInstitution" resultType="Map">
-        SELECT INS_ID,APP_ID,INS_CODE,INS_NAME,ins_parent_code,INS_CATEGORY,INS_IS_LAST,INS_PINYIN,INS_WUBI,province_code,province_name,city_code,city_name,area_code,area_name,INS_ADDRESS,INS_ISONLINE,SORT,CREATE_DATE,CREATE_USER,create_user_name,status,platform_code  from sys_institution
-        where 1=1 and status='1'
+        SELECT INS_ID,
+               APP_ID,
+               INS_CODE,
+               INS_NAME,
+               ins_parent_code,
+               INS_CATEGORY,
+               INS_IS_LAST,
+               INS_PINYIN,
+               INS_WUBI,
+               province_code,
+               province_name,
+               city_code,
+               city_name,
+               area_code,
+               area_name,
+               INS_ADDRESS,
+               INS_ISONLINE,
+               SORT,
+               CREATE_DATE,
+               CREATE_USER,
+               create_user_name,
+               update_date,
+               update_user,
+               update_user_name,
+               status,
+               platform_code
+        from sys_institution
+        where 1 = 1
+          and status = '1'
     </select>
 
 
     <!--分页查询基础语句返回对象-->
     <select id="getPageListByObj" parameterType="SysInstitution" resultMap="BaseResultMap">
         SELECT ins.*,(SELECT INS_NAME FROM sys_institution WHERE INS_CODE = ins.ins_parent_code limit 1) as INS_PNAME,
-            (SELECT app_name FROM sys_app WHERE app_id = ins.APP_ID LIMIT 1) AS  APP_NAME
+        (SELECT app_name FROM sys_app WHERE app_id = ins.APP_ID LIMIT 1) AS APP_NAME
         from sys_institution ins
         where status='1'
         <!--条件-->
         <if test="insName != null and insName!='' ">
-             and INS_NAME like CONCAT('%',trim(#{insName}),'%')
+            and INS_NAME like CONCAT('%',trim(#{insName}),'%')
         </if>
         <if test="appId != null and appId!='' ">
             and APP_ID = #{appId}
@@ -260,7 +319,9 @@
         order by ins.SORT, ins.INS_CODE
     </select>
     <select id="getSubIns" parameterType="String" resultType="String">
-        SELECT INS_CODE FROM sys_institution where ins_parent_code=#{insParentCode};
+        SELECT INS_CODE
+        FROM sys_institution
+        where ins_parent_code = #{insParentCode};
     </select>
     <select id="getSysInstitutionByOryCateGory" parameterType="SysInstitution" resultMap="BaseResultMap">
         SELECT INS_ID,INS_CODE,INS_NAME, ins_parent_code
@@ -313,8 +374,6 @@
     </select>
 
 
-
-
     <select id="getInsByIns" resultMap="BaseResultMap" parameterType="SysInstitution">
         SELECT *
         from sys_institution
@@ -334,15 +393,15 @@
 
     <select id="getInsAddressByIns" resultType="Map" parameterType="SysInstitution">
         SELECT
-            province_code            dcCountyCode,
-            province_name       dcCounty,
-            city_code                dcTownCode,
-            city_name           dcTown,
-            area_code                dcVillageCode,
-            area_name           dcVillage,
-            street_code              dcStreetCode,
-            street_name         dcStreet,
-            INS_ADDRESS             dcAddress
+        province_code dcCountyCode,
+        province_name dcCounty,
+        city_code dcTownCode,
+        city_name dcTown,
+        area_code dcVillageCode,
+        area_name dcVillage,
+        street_code dcStreetCode,
+        street_name dcStreet,
+        INS_ADDRESS dcAddress
         from sys_institution
         where status = '1'
         <if test="appId != null and appId!='' ">
@@ -358,8 +417,8 @@
 
     <select id="getInsListByIns" resultMap="BaseResultMap2" parameterType="SysInstitution">
         SELECT ins1.INS_ID,ins1.INS_CODE,ins1.INS_NAME,
-               ins2.INS_ID,ins2.INS_CODE,ins2.INS_NAME,
-               ins3.INS_ID,ins3.INS_CODE,ins3.INS_NAME
+        ins2.INS_ID,ins2.INS_CODE,ins2.INS_NAME,
+        ins3.INS_ID,ins3.INS_CODE,ins3.INS_NAME
         from sys_institution ins1
         left join sys_institution ins2 on ins1.INS_CODE = ins2.ins_parent_code and ins2.INS_CATEGORY = '2'
         left join sys_institution ins3 on ins2.INS_CODE = ins3.ins_parent_code and ins3.INS_CATEGORY = '3'
@@ -375,21 +434,22 @@
         </if>
         <if test="searchIns != null and searchIns!='' ">
             and (ins1.INS_NAME like CONCAT('%',trim(#{searchIns}),'%'
-                or ins2.INS_NAME like CONCAT('%',trim(#{searchIns}),'%'
-                or ins3.INS_NAME like CONCAT('%',trim(#{searchIns}),'%'
-                or ins1.INS_PINYIN like CONCAT('%',trim(#{searchIns}),'%'
-                or ins2.INS_PINYIN like CONCAT('%',trim(#{searchIns}),'%'
-                or ins3.INS_PINYIN like CONCAT('%',trim(#{searchIns}),'%'
-                or ins1.INS_WUBI like CONCAT('%',trim(#{searchIns}),'%'
-                or ins2.INS_WUBI like CONCAT('%',trim(#{searchIns}),'%'
-                or ins3.INS_WUBI like CONCAT('%',trim(#{searchIns}),'%'
-                )
+            or ins2.INS_NAME like CONCAT('%',trim(#{searchIns}),'%'
+            or ins3.INS_NAME like CONCAT('%',trim(#{searchIns}),'%'
+            or ins1.INS_PINYIN like CONCAT('%',trim(#{searchIns}),'%'
+            or ins2.INS_PINYIN like CONCAT('%',trim(#{searchIns}),'%'
+            or ins3.INS_PINYIN like CONCAT('%',trim(#{searchIns}),'%'
+            or ins1.INS_WUBI like CONCAT('%',trim(#{searchIns}),'%'
+            or ins2.INS_WUBI like CONCAT('%',trim(#{searchIns}),'%'
+            or ins3.INS_WUBI like CONCAT('%',trim(#{searchIns}),'%'
+            )
         </if>
         order by SORT, INS_CODE
     </select>
 
     <select id="getInsByAppId" resultMap="BaseResultMap" parameterType="SysInstitution">
-        SELECT  <include refid="Base_Column_List" />
+        SELECT
+        <include refid="Base_Column_List"/>
         from sys_institution
         <where>
             <if test="appId != null and appId!='' ">
@@ -400,13 +460,14 @@
     </select>
 
     <select id="getRootInsByAppId" resultMap="BaseResultMap" parameterType="SysInstitution">
-        SELECT  <include refid="Base_Column_List" />
+        SELECT
+        <include refid="Base_Column_List"/>
         from sys_institution
         where
-            ( ins_parent_code='' or ins_parent_code is null )
-            <if test="appId != null and appId!='' ">
-                and APP_ID =#{appId}
-            </if>
+        ( ins_parent_code='' or ins_parent_code is null )
+        <if test="appId != null and appId!='' ">
+            and APP_ID =#{appId}
+        </if>
         order by SORT, INS_CODE
 
     </select>
@@ -468,6 +529,15 @@
                 create_user_name = #{ createUsername },
             </if>
 
+            <if test="updateDate != null">
+                update_date = #{updateDate},
+            </if>
+            <if test="updateUser != null">
+                update_user = #{updateUser},
+            </if>
+            <if test="updateUserName != null">
+                update_user_name = #{updateUserName},
+            </if>
             <if test="status != null">
                 status = #{ status },
             </if>
@@ -481,7 +551,7 @@
         </set>
         <where>
             <if test="insId != null and insId != ''">
-                 INS_ID = #{ insId }
+                INS_ID = #{ insId }
             </if>
             <if test="insCode != null and insCode != ''">
                 and INS_CODE = #{ insCode }