Преглед изворни кода

修改查询标准字典接口字段

guxinyu пре 2 година
родитељ
комит
0b62c1e640

BIN
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/dic/TDicBase.java


BIN
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/beans/dic/TDicStandard.java


BIN
cbkj_web_parameter/src/main/java/com/jiuzhekan/cbkj/service/dic/TDicBaseService.java


+ 7 - 7
cbkj_web_parameter/src/main/resources/mappers/dic/TDicBaseMapper.xml

@@ -18,7 +18,7 @@
         <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="is_enable" jdbcType="VARCHAR" property="isEnable"/>
+        <result column="status" jdbcType="VARCHAR" property="status"/>
         <result column="mapping" jdbcType="VARCHAR" property="mapping"/>
         <result column="id" jdbcType="VARCHAR" property="id"/>
     </resultMap>
@@ -26,7 +26,7 @@
 
     <sql id="Base_Column_List">
         dic_id
-        ,dic_code,dic_name,parent_id,dic_desc,sort,app_id,ins_code,dept_id,pha_id,create_date,create_user,create_user_name,is_enable
+        ,dic_code,dic_name,parent_id,dic_desc,sort,app_id,ins_code,dept_id,pha_id,create_date,create_user,create_user_name,status
     </sql>
 
     <delete id="deleteByPrimaryKey" parameterType="TDicBase">
@@ -44,13 +44,13 @@
 
     <insert id="insert" parameterType="TDicBase">
         insert into t_dic_base (<include refid="Base_Column_List"/>) values
-        (#{dicId},#{dicCode},#{dicName},#{parentId},#{dicDesc},#{sort},#{appId},#{insCode},#{deptId},#{phaId},#{createDate},#{createUser},#{createUserName},#{isEnable})
+        (#{dicId},#{dicCode},#{dicName},#{parentId},#{dicDesc},#{sort},#{appId},#{insCode},#{deptId},#{phaId},#{createDate},#{createUser},#{createUserName},#{status})
     </insert>
 
     <insert id="insertList" parameterType="List">
         insert into t_dic_base (<include refid="Base_Column_List"/>) values
         <foreach collection="list" item="item" index="index" separator=",">
-            (#{item.dicId},#{item.dicCode},#{item.dicName},#{item.parentId},#{item.dicDesc},#{item.sort},#{item.appId},#{item.insCode},#{item.deptId},#{item.phaId},#{item.createDate},#{item.createUser},#{item.createUserName},#{item.isEnable})
+            (#{item.dicId},#{item.dicCode},#{item.dicName},#{item.parentId},#{item.dicDesc},#{item.sort},#{item.appId},#{item.insCode},#{item.deptId},#{item.phaId},#{item.createDate},#{item.createUser},#{item.createUserName},#{item.status})
         </foreach>
     </insert>
 
@@ -93,8 +93,8 @@
             <if test="createUserName != null and createUserName!=''">
                 create_user_name = #{ createUserName },
             </if>
-            <if test="isEnable != null and isEnable!=''">
-                is_enable = #{ isEnable },
+            <if test="status != null and status!=''">
+                status = #{status},
             </if>
         </set>
         where dic_id = #{ dicId }
@@ -108,7 +108,7 @@
 
     <select id="getPageListByObj" parameterType="TDicBase" resultMap="BaseResultMap">
         SELECT
-        dic_id,dic_code,dic_name,parent_id,dic_desc,sort,app_id,ins_code,dept_id,pha_id,create_date,create_user,create_user_name,is_enable
+        dic_id,dic_code,dic_name,parent_id,dic_desc,sort,app_id,ins_code,dept_id,pha_id,create_date,create_user,create_user_name,status
         from t_dic_base
         <where>
             <if test=" dicName != null and dicName!='' ">

+ 10 - 8
cbkj_web_parameter/src/main/resources/mappers/dic/TDicStandardMapper.xml

@@ -13,12 +13,12 @@
         <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="is_enable" jdbcType="VARCHAR" property="isEnable" />
+        <result column="status" jdbcType="VARCHAR" property="status" />
     </resultMap>
 
 
     <sql id="Base_Column_List">
-    stan_id,stan_code,stan_name,parent_id,stan_desc,stan_type,sort,create_date,create_user,create_user_name,is_enable
+    stan_id,stan_code,stan_name,parent_id,stan_desc,stan_type,sort,create_date,create_user,create_user_name,status
     </sql>
 
     <delete id="deleteByPrimaryKey" parameterType="TDicStandard">
@@ -34,13 +34,13 @@
 
     <insert id="insert"  parameterType="TDicStandard">
         insert into t_dic_standard (<include refid="Base_Column_List" />) values
-        (#{stanId},#{stanCode},#{stanName},#{parentId},#{stanDesc},#{stanType},#{sort},#{createDate},#{createUser},#{createUserName},#{isEnable})
+        (#{stanId},#{stanCode},#{stanName},#{parentId},#{stanDesc},#{stanType},#{sort},#{createDate},#{createUser},#{createUserName},#{status})
     </insert>
 
     <insert id="insertList" parameterType="List">
         insert into t_dic_standard (<include refid="Base_Column_List" />) values
         <foreach collection="list" item="item" index="index" separator="," >
-            (#{item.stanId},#{item.stanCode},#{item.stanName},#{item.parentId},#{item.stanDesc},#{item.stanType},#{item.sort},#{item.createDate},#{item.createUser},#{item.createUserName},#{item.isEnable})
+            (#{item.stanId},#{item.stanCode},#{item.stanName},#{item.parentId},#{item.stanDesc},#{item.stanType},#{item.sort},#{item.createDate},#{item.createUser},#{item.createUserName},#{item.status})
         </foreach>
     </insert>
 
@@ -74,8 +74,8 @@
              <if test="createUserName != null and createUserName!=''">
                 create_user_name = #{ createUserName },
              </if>
-             <if test="isEnable != null and isEnable!=''">
-                is_enable = #{ isEnable },
+             <if test="status != null and status!=''">
+                status = #{status},
              </if>
         </set>
         where stan_id = #{ stanId }
@@ -87,8 +87,10 @@
     </select>
 
     <select id="getPageListByObj" parameterType="TDicStandard" resultMap="BaseResultMap">
-        SELECT stan_id,stan_code,stan_name,parent_id,stan_desc,stan_type,sort,create_date,create_user,create_user_name,is_enable
-        from t_dic_standard
+        SELECT tds.stan_id,tds.stan_code,tds.stan_name,tds.parent_id,tds.stan_desc,tds.stan_type,tds.sort,tds.create_date,tds.create_user,tds.create_user_name,tds.status,
+        tdss.stan_name
+        FROM t_dic_standard AS tds
+        INNER JOIN t_dic_standard tdss ON tds.parent_id=tdss.stan_id
         <where>
             <if test=" stanName != null and stanName!='' ">
                 and stan_name like CONCAT('%',trim(#{stanName}),'%')