package com.persagy.adm.server.backstage.service.impl;

import com.alibaba.fastjson.JSONArray;
import com.persagy.dmp.common.constant.DigitalObjectType;
import com.persagy.dmp.digital.entity.ObjectDigital;
import com.sun.org.apache.bcel.internal.generic.NEW;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 处理Spaces,Rooms的数据处理类
 * @author : lijie
 * Update By 2022/1/22 17:20
 */
@Component
@Slf4j
@RequiredArgsConstructor
public class SpaceDataHandler extends AbstractDataHandler {
    /**
     * 获得对象分类
     * @param classCode :对象类型编码
     * @return : java.lang.String
     * @author : lijie
     * Update By 2022/1/22 17:21
     */
    @Override
    protected String getObjectType(String classCode) {
        return DigitalObjectType.SPACE.getIndex();
    }
    /**
     * 获取对象类型
     * @param classCode : 对象类型
     * @return : java.lang.String
     * @author : lijie
     * Update By 2022/1/22 18:26
     */
    @Override
    protected String getClassCode(String classCode) {
        // 物业分区类型
        return "GeneralZone";
    }

    @Override
    protected JSONArray generateOutline(JSONArray srcOutline) {
        JSONArray array = new JSONArray();
        array.add(srcOutline);
        return array;
    }
}
