|
@@ -6,6 +6,7 @@
|
|
|
<resultMap id="AreaMap" type="com.jpsoft.excellent.modules.base.entity.Area">
|
|
|
<id property="id" column="id_" />
|
|
|
<result property="parentId" column="parent_id" />
|
|
|
+ <result property="code" column="code_" />
|
|
|
<result property="name" column="name_" />
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
<result property="createTime" column="create_time" />
|
|
@@ -21,11 +22,12 @@
|
|
|
-->
|
|
|
<![CDATA[
|
|
|
insert into base_area
|
|
|
- (id_,parent_id,name_,del_flag,create_time,create_by,update_time,update_by)
|
|
|
+ (id_,parent_id,code_,name_,del_flag,create_time,create_by,update_time,update_by)
|
|
|
values
|
|
|
(
|
|
|
#{id,jdbcType=VARCHAR}
|
|
|
,#{parentId,jdbcType=VARCHAR}
|
|
|
+,#{code,jdbcType=VARCHAR}
|
|
|
,#{name,jdbcType=VARCHAR}
|
|
|
,#{delFlag,jdbcType= NUMERIC }
|
|
|
,#{createTime,jdbcType= TIMESTAMP }
|
|
@@ -44,6 +46,9 @@
|
|
|
<if test="parentId!=null">
|
|
|
parent_id=#{parentId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
+ <if test="code!=null">
|
|
|
+ code_=#{code,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
<if test="name!=null">
|
|
|
name_=#{name,jdbcType=VARCHAR},
|
|
|
</if>
|
|
@@ -67,7 +72,7 @@
|
|
|
</update>
|
|
|
<select id="get" parameterType="string" resultMap="AreaMap">
|
|
|
select
|
|
|
-id_,parent_id,name_,del_flag,create_time,create_by,update_time,update_by from base_area where id_=#{0}
|
|
|
+id_,parent_id,code_,name_,del_flag,create_time,create_by,update_time,update_by from base_area where id_=#{0}
|
|
|
</select>
|
|
|
<select id="exist" parameterType="string" resultType="int">
|
|
|
select count(*) from base_area where id_=#{0}
|
|
@@ -104,4 +109,8 @@ id_,parent_id,name_,del_flag,create_time,create_by,update_time,update_by from b
|
|
|
and name_=#{0}
|
|
|
limit 1
|
|
|
</select>
|
|
|
+ <select id="listByParentId" resultMap="AreaMap">
|
|
|
+ SELECT * FROM base_area
|
|
|
+ where parent_id = #{0}
|
|
|
+ </select>
|
|
|
</mapper>
|