hym 4 years ago
parent
commit
9f21479011

+ 1 - 0
src/main/java/com/zoniot/ccrc/dto/OrganizationDto.java

@@ -14,5 +14,6 @@ import java.util.List;
 public class OrganizationDto extends Organization {
 
     @ApiModelProperty(value = "子类", position = 100)
+    private String commutityIds;
     private List<OrganizationDto> children;
 }

+ 3 - 1
src/main/resources/mapper/OrganizationMapper.xml

@@ -186,7 +186,9 @@
     </delete>
 
     <select id="findList" resultType="com.zoniot.ccrc.dto.OrganizationDto">
-        select <include refid="Base_Column_List"/> from sc_organization
+        select a.*,b.commutityIds from sc_organization a
+        left join (select GROUP_CONCAT(id)commutityIds,org_id from sc_community group by org_id) b
+        on a.id=b.org_id
         where status = 1
         <if test="siteId != null"> and site_id = #{siteId} </if>
         order by create_date desc