|
|
|
@ -48,19 +48,16 @@ public interface OrganizationMapper extends BaseMapperX<OrganizationDO> {
|
|
|
|
|
.orderByDesc(OrganizationDO::getId));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Select("SELECT o.id AS organizationId, o.organization_name AS organizationName, o.organization_code AS organizationCode, " +
|
|
|
|
|
"d.id AS depotId, d.name AS depotName, d.code AS depotCode, " +
|
|
|
|
|
"c.id AS cabinetId, c.name AS cabinetName, c.code AS cabinetCode " +
|
|
|
|
|
"FROM setting_organization o " +
|
|
|
|
|
"LEFT JOIN setting_depot d ON o.id = d.organization_id " +
|
|
|
|
|
"LEFT JOIN setting_depot_cabinet c ON d.id = c.depot_id ")
|
|
|
|
|
@Results({
|
|
|
|
|
@Result(property = "organizationId", column = "organizationId"),
|
|
|
|
|
@Select("SELECT o.id AS organizationId, o.organization_name AS organizationName, o.organization_code AS organizationCode, "
|
|
|
|
|
+ "d.id AS depotId, d.name AS depotName, d.code AS depotCode, "
|
|
|
|
|
+ "IFNULL(c.id, '') AS cabinetId, IFNULL(c.name, '') AS cabinetName, IFNULL(c.code, '') AS cabinetCode "
|
|
|
|
|
+ "FROM setting_organization o "
|
|
|
|
|
+ "LEFT JOIN setting_depot d ON o.id = d.organization_id "
|
|
|
|
|
+ "LEFT JOIN setting_depot_cabinet c ON d.id = c.depot_id ")
|
|
|
|
|
@Results({ @Result(property = "organizationId", column = "organizationId"),
|
|
|
|
|
@Result(property = "organizationName", column = "organizationName"),
|
|
|
|
|
@Result(property = "organizationCode", column = "organizationCode"),
|
|
|
|
|
@Result(property = "children", column = "organizationId",javaType = List.class,
|
|
|
|
|
many=@Many(select="cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper.getDepotCabinetByOrganization"))
|
|
|
|
|
})
|
|
|
|
|
@Result(property = "children", column = "organizationId",javaType = List.class, many=@Many(select="cn.iocoder.yudao.module.setting.dal.mysql.depot.DepotMapper.getDepotCabinetByOrganization")) })
|
|
|
|
|
List<OrganizationDepotVO> getOrganizationDepotCabinets();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|