(1)tree属性扩展,支持新增节点
(2)特定服务增加一列标记新增节点
This commit is contained in:
@@ -50,5 +50,6 @@ public interface SpecificServiceCfgDao extends CrudDao<SpecificServiceCfg> {
|
||||
Integer getParentType(Integer specServiceId);
|
||||
Integer getParentCode(Integer specServiceId);
|
||||
SpecificServiceCfg getRepeat(@Param("specServiceCode")Integer code, @Param("cfgType")Integer cfgType,@Param("parentId")Integer parentId);
|
||||
Integer getMaxServiceCode(@Param("maxCode")Integer code, @Param("cfgType")Integer cfgType,@Param("addFlag")Integer addFlag);
|
||||
|
||||
}
|
||||
@@ -12,6 +12,7 @@
|
||||
<result column="is_leaf" property="isLeaf" jdbcType="INTEGER" />
|
||||
<result column="group_id" property="groupId" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="INTEGER" />
|
||||
<result column="add_flag" property="addFlag" jdbcType="INTEGER" />
|
||||
<result column="business_type" property="businessType" jdbcType="VARCHAR" />
|
||||
<!-- 父id -->
|
||||
<association property="parent" javaType="com.nis.domain.specific.SpecificServiceCfg">
|
||||
@@ -30,7 +31,8 @@
|
||||
s.is_leaf AS isLeaf,
|
||||
s.group_id AS groupId,
|
||||
s.cfg_type AS cfgType,
|
||||
s.business_type AS businessType
|
||||
s.business_type AS businessType,
|
||||
s.add_flag AS addFlag
|
||||
</sql>
|
||||
|
||||
|
||||
@@ -152,6 +154,9 @@
|
||||
<if test="specificServiceCfg.endDate != null" >
|
||||
AND op_time < #{specificServiceCfg.endDate}
|
||||
</if>
|
||||
<if test="specificServiceCfg.addFlag != null and specificServiceCfg.addFlag != '' ">
|
||||
AND add_flag = #{specificServiceCfg.addFlag}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="orderBy != null and orderBy != '' ">
|
||||
ORDER BY ${orderBy}
|
||||
@@ -161,11 +166,23 @@
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="getMaxServiceCode" resultType="java.lang.Integer" >
|
||||
SELECT MAX(spec_service_code) FROM specific_service_cfg WHERE is_valid=1 AND spec_service_code < #{maxCode}
|
||||
<if test="cfgType != null and cfgType != '' ">
|
||||
AND cfg_type = #{cfgType}
|
||||
</if>
|
||||
<if test="addFlag != null and addFlag != '' ">
|
||||
AND add_flag = #{addFlag}
|
||||
</if>
|
||||
</select>
|
||||
<!-- 新增 -->
|
||||
<insert id="insert" parameterType="com.nis.domain.specific.SpecificServiceCfg" useGeneratedKeys="true">
|
||||
insert into specific_service_cfg (spec_service_code,spec_service_name,spec_service_desc,is_valid, op_time, parent_id,is_leaf,group_id,cfg_type,business_type)
|
||||
values(#{specServiceCode},#{specServiceName},#{specServiceDesc},#{isValid},#{opTime},#{parent.specServiceId},#{isLeaf},#{groupId},#{cfgType},#{businessType})
|
||||
<selectKey resultType="java.lang.Integer" order="AFTER" keyProperty="specServiceId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into specific_service_cfg (spec_service_code,spec_service_name,spec_service_desc,is_valid, op_time, parent_id,is_leaf,group_id,cfg_type,business_type,add_flag)
|
||||
values(#{specServiceCode},#{specServiceName},#{specServiceDesc},#{isValid},#{opTime},#{parent.specServiceId},#{isLeaf},#{groupId},#{cfgType},
|
||||
#{businessType},#{addFlag})
|
||||
</insert>
|
||||
|
||||
<!-- 修改 -->
|
||||
|
||||
Reference in New Issue
Block a user