|
@@ -9,6 +9,7 @@
|
|
<resultMap type="com.ym.mec.biz.dal.entity.Organization" id="Organization">
|
|
<resultMap type="com.ym.mec.biz.dal.entity.Organization" id="Organization">
|
|
<result column="id_" property="id"/>
|
|
<result column="id_" property="id"/>
|
|
<result column="name_" property="name"/>
|
|
<result column="name_" property="name"/>
|
|
|
|
+ <result column="area_name_" property="areaName"/>
|
|
<result column="area_id_" property="areaId"/>
|
|
<result column="area_id_" property="areaId"/>
|
|
<result column="create_time_" property="createTime"/>
|
|
<result column="create_time_" property="createTime"/>
|
|
<result column="update_time_" property="updateTime"/>
|
|
<result column="update_time_" property="updateTime"/>
|
|
@@ -76,14 +77,14 @@
|
|
<sql id="queryPageSql">
|
|
<sql id="queryPageSql">
|
|
<where>
|
|
<where>
|
|
<if test="delFlag != null">
|
|
<if test="delFlag != null">
|
|
- del_flag_ = #{delFlag,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
|
|
|
+ o.del_flag_ = #{delFlag,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
<!-- 分页查询 -->
|
|
<select id="queryPage" resultMap="Organization" parameterType="map">
|
|
<select id="queryPage" resultMap="Organization" parameterType="map">
|
|
- SELECT * FROM organization
|
|
|
|
|
|
+ SELECT o.*,sa.name_ area_name_ FROM organization o LEFT JOIN sys_area sa ON o.area_id_ = sa.id_
|
|
<include refid="queryPageSql"/>
|
|
<include refid="queryPageSql"/>
|
|
ORDER BY id_
|
|
ORDER BY id_
|
|
<include refid="global.limit"/>
|
|
<include refid="global.limit"/>
|
|
@@ -91,12 +92,15 @@
|
|
|
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
<!-- 查询当前表的总记录数 -->
|
|
<select id="queryCount" resultType="int">
|
|
<select id="queryCount" resultType="int">
|
|
- SELECT COUNT(*) FROM organization <include refid="queryPageSql"/>
|
|
|
|
|
|
+ SELECT COUNT(o.id_) FROM organization o <include refid="queryPageSql"/>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="findByParentId" resultMap="Organization">
|
|
<select id="findByParentId" resultMap="Organization">
|
|
- SELECT * FROM organization <include refid="queryPageSql"/>
|
|
|
|
|
|
+ SELECT o.*,sa.name_ area_name_ FROM organization o
|
|
|
|
+ LEFT JOIN sys_area sa ON o.area_id_ = sa.id_
|
|
|
|
+ <include refid="queryPageSql"/>
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="findByOrganIds" resultType="java.lang.String">
|
|
<select id="findByOrganIds" resultType="java.lang.String">
|
|
SELECT name_ FROM organization IN (#{organIds}) WHERE del_flag_ = 0
|
|
SELECT name_ FROM organization IN (#{organIds}) WHERE del_flag_ = 0
|
|
</select>
|
|
</select>
|