|
@@ -203,12 +203,17 @@
|
|
|
|
|
|
|
|
|
<select id="findByNameUnique" resultType="int">
|
|
|
- select count(1) from sc_building where status = 1 and name = #{name} and site_id = #{siteId} and community = #{community}
|
|
|
+ select count(1) from sc_building where status = 1 and name = #{name} and site_id = #{siteId} and community_id = #{community}
|
|
|
<if test="id != null"> and id != #{id}</if>
|
|
|
</select>
|
|
|
|
|
|
<select id="getBuildingList" resultType="com.zoniot.ccrc.dto.BuildingDto">
|
|
|
- select * from sc_building where status = 1
|
|
|
+ select
|
|
|
+ sb.*,
|
|
|
+ sc.name as community_name
|
|
|
+ from sc_building sb
|
|
|
+ left join sc_community sc on(sc.id = sb.community_id)
|
|
|
+ where sb.status = 1
|
|
|
</select>
|
|
|
|
|
|
<select id="getById" resultType="com.zoniot.ccrc.dto.BuildingDto">
|