|
@@ -1,11 +1,16 @@
|
|
|
package com.persagy.bdtp.adm.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
+import cn.hutool.core.date.DatePattern;
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.persagy.bdtp.adm.client.DicClient;
|
|
|
import com.persagy.bdtp.adm.client.RwdClient;
|
|
|
import com.persagy.bdtp.adm.common.AdmConst;
|
|
|
+import com.persagy.bdtp.adm.common.AdmMessageConst;
|
|
|
import com.persagy.bdtp.adm.common.AdmResult;
|
|
|
import com.persagy.bdtp.adm.dao.*;
|
|
|
import com.persagy.bdtp.adm.entity.*;
|
|
@@ -13,10 +18,13 @@ import com.persagy.bdtp.adm.entity.oldadm.OProject;
|
|
|
import com.persagy.bdtp.adm.service.*;
|
|
|
import com.persagy.dmp.basic.model.QueryCriteria;
|
|
|
import com.persagy.dmp.common.constant.ResponseCode;
|
|
|
+import com.persagy.dmp.common.constant.ValidEnum;
|
|
|
import com.persagy.dmp.common.helper.SpringHelper;
|
|
|
+import com.persagy.dmp.common.lang.PsDateTime;
|
|
|
import com.persagy.dmp.define.entity.RelationDefine;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.*;
|
|
|
|
|
@@ -38,6 +46,13 @@ public class SyncAppImpl implements ISyncApp {
|
|
|
@Autowired
|
|
|
private IConfigService configService;
|
|
|
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private AdmObjectMapper admObjMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private AdmRelationMapper relationMapper;
|
|
|
+
|
|
|
@Autowired
|
|
|
private AdmJobSpaceMapper jobSpaceMapper;
|
|
|
|
|
@@ -48,19 +63,19 @@ public class SyncAppImpl implements ISyncApp {
|
|
|
private AdmProblemEquipMapper problemEquipMapper;
|
|
|
|
|
|
@Autowired
|
|
|
- private AdmRelationMapper relationMapper;
|
|
|
-
|
|
|
- @Autowired
|
|
|
private AdmFileMapper fileMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private AdmQrCodeMapper qrCodeMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISyncModel syncModel;
|
|
|
+
|
|
|
@Override
|
|
|
public Map<String, Object> downloadDictAndConfig(String groupCode, String projectId, String userId) {
|
|
|
Map<String, Object> dict = queryDict(groupCode, projectId, userId);
|
|
|
|
|
|
- //TODO 配置数据查询
|
|
|
+ //配置数据查询
|
|
|
List<AdmM2dEquip> m2dTypes = configService.queryM2dEquip(projectId);
|
|
|
List<AdmInfosConfig> infosConfig = configService.queryInfosConfig(projectId);
|
|
|
List<AdmRelsConfig> relConfig = configService.queryRelsConfig(projectId);
|
|
@@ -71,10 +86,10 @@ public class SyncAppImpl implements ISyncApp {
|
|
|
HashMap<String, Object> data = new HashMap<>();
|
|
|
data.put("dict", dict);
|
|
|
data.put("m2dTypes", m2dTypes);
|
|
|
- data.put("infosConfig", infosConfig);
|
|
|
+ data.put("infosConfig", serializeJsonProp(infosConfig));
|
|
|
data.put("relConfig", relConfig);
|
|
|
data.put("pipeConfig", pipeConfig);
|
|
|
- data.put("config", config);
|
|
|
+ data.put("config", serializeJsonProp(config));
|
|
|
data.put("component", component);
|
|
|
|
|
|
return data;
|
|
@@ -154,44 +169,268 @@ public class SyncAppImpl implements ISyncApp {
|
|
|
|
|
|
HashMap<String, Object> data = new HashMap<>();
|
|
|
data.put("projects", prjList);
|
|
|
- data.put("buildingsAndFloors", bdAndFl);
|
|
|
+ data.put("buildingsAndFloors", serializeJsonProp(bdAndFl));
|
|
|
return data;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Object> downloadFloorData(String projectId, String floorId) {
|
|
|
- List<AdmObject> floorData = objectService.queryByFloor(projectId, floorId);
|
|
|
- List<AdmRelation> floorRel = relationMapper.selectList(buildQueryWrapperForFloor(new QueryWrapper<AdmRelation>(), projectId, floorId, true));
|
|
|
+ public Map<String, Object> downloadFloorData(String projectId, String floorId, String uploadFlag, String lastDownloadTime) {
|
|
|
+ List<AdmObject> floorData = admObjMapper.selectList(buildQueryWrapperForFloor(new QueryWrapper<AdmObject>(), projectId, floorId, true, uploadFlag, lastDownloadTime));
|
|
|
+ List<AdmRelation> floorRel = relationMapper.selectList(buildQueryWrapperForFloor(new QueryWrapper<AdmRelation>(), projectId, floorId, true, uploadFlag, lastDownloadTime));
|
|
|
|
|
|
- //TODO 任务相关数据查询
|
|
|
- List<AdmJobSpace> jobSpace = jobSpaceMapper.selectList(buildQueryWrapperForFloor(new QueryWrapper<AdmJobSpace>(), projectId, floorId, false));
|
|
|
- List<AdmProblemArch> problemArch = problemArchMapper.selectList(buildQueryWrapperForFloor(new QueryWrapper<AdmProblemArch>(), projectId, floorId, false));
|
|
|
- List<AdmProblemEquip> problemEquip = problemEquipMapper.selectList(buildQueryWrapperForFloor(new QueryWrapper<AdmProblemEquip>(), projectId, floorId, false));
|
|
|
- List<AdmFile> file = fileMapper.selectList(buildQueryWrapperForFloor(new QueryWrapper<AdmFile>(), projectId, floorId, false));
|
|
|
- List<AdmQrCode> qrCode = qrCodeMapper.selectList(buildQueryWrapperForFloor(new QueryWrapper<AdmQrCode>(), projectId, floorId, false));
|
|
|
+ //任务相关数据查询
|
|
|
+ List<AdmJobSpace> jobSpace = jobSpaceMapper.selectList(buildQueryWrapperForFloor(new QueryWrapper<AdmJobSpace>(), projectId, floorId, false, uploadFlag, lastDownloadTime));
|
|
|
+ List<AdmProblemArch> problemArch = problemArchMapper.selectList(buildQueryWrapperForFloor(new QueryWrapper<AdmProblemArch>(), projectId, floorId, false, uploadFlag, lastDownloadTime));
|
|
|
+ List<AdmProblemEquip> problemEquip = problemEquipMapper.selectList(buildQueryWrapperForFloor(new QueryWrapper<AdmProblemEquip>(), projectId, floorId, false, uploadFlag, lastDownloadTime));
|
|
|
+ List<AdmFile> file = fileMapper.selectList(buildQueryWrapperForFloor(new QueryWrapper<AdmFile>(), projectId, floorId, false, uploadFlag, lastDownloadTime));
|
|
|
+ List<AdmQrCode> qrCode = qrCodeMapper.selectList(buildQueryWrapperForFloor(new QueryWrapper<AdmQrCode>(), projectId, floorId, false, uploadFlag, lastDownloadTime));
|
|
|
|
|
|
HashMap<String, Object> data = new HashMap<>();
|
|
|
data.put("floorId", floorId);
|
|
|
|
|
|
- data.put("objects", floorData);
|
|
|
+ data.put("objects", serializeJsonProp(floorData));
|
|
|
data.put("relations", floorRel);
|
|
|
|
|
|
- data.put("jobSpace", jobSpace);
|
|
|
- data.put("problemArch", problemArch);
|
|
|
+ data.put("jobSpace", serializeJsonProp(jobSpace));
|
|
|
+ data.put("problemArch", serializeJsonProp(problemArch));
|
|
|
data.put("problemEquip", problemEquip);
|
|
|
data.put("file", file);
|
|
|
- data.put("qrCode", qrCode);
|
|
|
+ data.put("qrCode", serializeJsonProp(qrCode));
|
|
|
+ data.put("timestamp", DateUtil.format(new Date(), DatePattern.PURE_DATETIME_PATTERN));
|
|
|
|
|
|
return data;
|
|
|
}
|
|
|
|
|
|
- private <T> QueryWrapper<T> buildQueryWrapperForFloor(QueryWrapper<T> wrapper, String projectId, String floorId, boolean floorIdNull){
|
|
|
+ private <T> QueryWrapper<T> buildQueryWrapperForFloor(QueryWrapper<T> wrapper, String projectId, String floorId, boolean floorIdNull, String uploadFlag, String lastDownloadTime){
|
|
|
wrapper.eq("project_id", projectId);
|
|
|
if(!floorIdNull)
|
|
|
wrapper.eq("floor_id", floorId);
|
|
|
else
|
|
|
wrapper.and(w -> w.eq("floor_id", floorId).or().isNull("floor_id"));
|
|
|
+ applyUploadFlag(wrapper, uploadFlag,lastDownloadTime);
|
|
|
return wrapper;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public SyncData downloadBuildingData(String projectId, String buildingId, String uploadFlag, String lastDownloadTime) {
|
|
|
+ List<AdmObject> bdData = admObjMapper.selectList(buildDownloadQueryWrapper(new QueryWrapper<AdmObject>(), projectId, buildingId, uploadFlag, lastDownloadTime));
|
|
|
+ List<AdmRelation> bdRel = relationMapper.selectList(buildDownloadQueryWrapper(new QueryWrapper<AdmRelation>(), projectId, buildingId, uploadFlag, lastDownloadTime));
|
|
|
+
|
|
|
+ //任务相关数据查询
|
|
|
+ List<AdmJobSpace> jobSpace = jobSpaceMapper.selectList(buildDownloadQueryWrapper(new QueryWrapper<AdmJobSpace>(), projectId, buildingId, uploadFlag, lastDownloadTime));
|
|
|
+ List<AdmProblemArch> problemArch = problemArchMapper.selectList(buildDownloadQueryWrapper(new QueryWrapper<AdmProblemArch>(), projectId, buildingId, uploadFlag, lastDownloadTime));
|
|
|
+ List<AdmProblemEquip> problemEquip = problemEquipMapper.selectList(buildDownloadQueryWrapper(new QueryWrapper<AdmProblemEquip>(), projectId, buildingId, uploadFlag, lastDownloadTime));
|
|
|
+ List<AdmFile> file = fileMapper.selectList(buildDownloadQueryWrapper(new QueryWrapper<AdmFile>(), projectId, buildingId, uploadFlag, lastDownloadTime));
|
|
|
+ List<AdmQrCode> qrCode = qrCodeMapper.selectList(buildDownloadQueryWrapper(new QueryWrapper<AdmQrCode>(), projectId, buildingId, uploadFlag, lastDownloadTime));
|
|
|
+
|
|
|
+ SyncData data = new SyncData();
|
|
|
+ data.setBuildingId(buildingId);
|
|
|
+
|
|
|
+ data.setObjects(serializeJsonProp(bdData));
|
|
|
+ data.setRelations(bdRel);
|
|
|
+
|
|
|
+ data.setJobSpace(serializeJsonProp(jobSpace));
|
|
|
+ data.setProblemArch(serializeJsonProp(problemArch));
|
|
|
+ data.setProblemEquip(problemEquip);
|
|
|
+ data.setFile(file);
|
|
|
+ data.setQrCode(serializeJsonProp(qrCode));
|
|
|
+ data.setTimestamp(DateUtil.format(new Date(), DatePattern.PURE_DATETIME_PATTERN));
|
|
|
+
|
|
|
+ return data;
|
|
|
+ }
|
|
|
+
|
|
|
+ private <T> QueryWrapper<T> buildDownloadQueryWrapper(QueryWrapper<T> wrapper, String projectId, String buildingId, String uploadFlag, String lastDownloadTime){
|
|
|
+ wrapper.eq("project_id", projectId).eq("building_id", buildingId);
|
|
|
+ applyUploadFlag(wrapper, uploadFlag,lastDownloadTime);
|
|
|
+ return wrapper;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void applyUploadFlag(QueryWrapper<?> wrapper, String uploadFlag, String lastDownloadTime){
|
|
|
+ if(StrUtil.isNotBlank(uploadFlag))
|
|
|
+ wrapper.and(w -> w.isNull("upload_flag").or().ne("upload_flag", uploadFlag));
|
|
|
+ if (StrUtil.isNotBlank(lastDownloadTime)) {
|
|
|
+ wrapper.and(
|
|
|
+ w -> w.isNotNull("modified_time").gt("modified_time", lastDownloadTime)
|
|
|
+ .or()
|
|
|
+ .isNull("modified_time").gt("creation_time", lastDownloadTime)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public UploadRtn uploadData(SyncData uploadData, String projectId, String uploadFlag) {
|
|
|
+ UploadRtn rtn = new UploadRtn();
|
|
|
+ PsDateTime timestamp = new PsDateTime(System.currentTimeMillis());
|
|
|
+
|
|
|
+ if (CollUtil.isNotEmpty(uploadData.getObjects())) {
|
|
|
+ List<AdmObject> dbObjs = admObjMapper.selectList(new QueryWrapper<AdmObject>().eq("building_id", uploadData.getBuildingId()).eq("valid", ValidEnum.TRUE.getType()));
|
|
|
+ List<AdmObject> expired = uploadBdtpData(uploadData.getObjects(), dbObjs, uploadFlag, timestamp, admObjMapper, "object");
|
|
|
+ rtn.setExpiredObjectIds(buildExpiredIds(expired));
|
|
|
+ }
|
|
|
+ if (CollUtil.isNotEmpty(uploadData.getRelations())) {
|
|
|
+ List<AdmRelation> dbObjs = relationMapper.selectList(new QueryWrapper<AdmRelation>().eq("building_id", uploadData.getBuildingId()).eq("valid", ValidEnum.TRUE.getType()));
|
|
|
+ List<AdmRelation> expired = uploadBdtpData(uploadData.getRelations(), dbObjs, uploadFlag, timestamp, relationMapper, "relation");
|
|
|
+ rtn.setExpiredRelationIds(buildExpiredIds(expired));
|
|
|
+ }
|
|
|
+
|
|
|
+ String timestampStr = timestamp.toString();
|
|
|
+ if (CollUtil.isNotEmpty(uploadData.getJobSpace())) {
|
|
|
+ List<AdmJobSpace> dbObjs = jobSpaceMapper.selectList(new QueryWrapper<AdmJobSpace>().eq("building_id", uploadData.getBuildingId()).eq("valid", ValidEnum.TRUE.getType()));
|
|
|
+ List<AdmJobSpace> expired = uploadAdmData(uploadData.getJobSpace(), dbObjs, uploadFlag, timestampStr, jobSpaceMapper);
|
|
|
+ rtn.setExpiredJobSpaceIds(buildExpiredIds(expired));
|
|
|
+ }
|
|
|
+ if (CollUtil.isNotEmpty(uploadData.getProblemArch())) {
|
|
|
+ List<AdmProblemArch> dbObjs = problemArchMapper.selectList(new QueryWrapper<AdmProblemArch>().eq("building_id", uploadData.getBuildingId()).eq("valid", ValidEnum.TRUE.getType()));
|
|
|
+ List<AdmProblemArch> expired = uploadAdmData(uploadData.getProblemArch(), dbObjs, uploadFlag, timestampStr, problemArchMapper);
|
|
|
+ rtn.setExpiredProblemArchIds(buildExpiredIds(expired));
|
|
|
+ }
|
|
|
+ if (CollUtil.isNotEmpty(uploadData.getProblemEquip())) {
|
|
|
+ List<AdmProblemEquip> dbObjs = problemEquipMapper.selectList(new QueryWrapper<AdmProblemEquip>().eq("building_id", uploadData.getBuildingId()).eq("valid", ValidEnum.TRUE.getType()));
|
|
|
+ List<AdmProblemEquip> expired = uploadAdmData(uploadData.getProblemEquip(), dbObjs, uploadFlag, timestampStr, problemEquipMapper);
|
|
|
+ rtn.setExpiredProblemEquipIds(buildExpiredIds(expired));
|
|
|
+ }
|
|
|
+ if (CollUtil.isNotEmpty(uploadData.getFile())) {
|
|
|
+ List<AdmFile> dbObjs = fileMapper.selectList(new QueryWrapper<AdmFile>().eq("building_id", uploadData.getBuildingId()).eq("valid", ValidEnum.TRUE.getType()));
|
|
|
+ List<AdmFile> expired = uploadAdmData(uploadData.getFile(), dbObjs, uploadFlag, timestampStr, fileMapper);
|
|
|
+ rtn.setExpiredFileIds(buildExpiredIds(expired));
|
|
|
+ }
|
|
|
+ if (CollUtil.isNotEmpty(uploadData.getQrCode())) {
|
|
|
+ List<AdmQrCode> dbObjs = qrCodeMapper.selectList(new QueryWrapper<AdmQrCode>().eq("building_id", uploadData.getBuildingId()).eq("valid", ValidEnum.TRUE.getType()));
|
|
|
+ List<AdmQrCode> expired = uploadAdmData(uploadData.getQrCode(), dbObjs, uploadFlag, timestampStr, qrCodeMapper);
|
|
|
+ rtn.setExpiredQrCodeIds(buildExpiredIds(expired));
|
|
|
+ }
|
|
|
+
|
|
|
+ rtn.setTimestamp(timestampStr);
|
|
|
+ return rtn;
|
|
|
+ }
|
|
|
+
|
|
|
+ private <T extends IAdmBdtpEntity> List<T> uploadBdtpData(List<T> objs, List<T> dbObjs, String uploadFlag, PsDateTime timestamp, BaseMapper<T> mapper, String objectType){
|
|
|
+ List<T> expired = new ArrayList<>();
|
|
|
+ HashMap<String, T> map = new HashMap<>(dbObjs.size());
|
|
|
+ for(T dbObj : dbObjs) {
|
|
|
+ map.put(dbObj.getId(), dbObj);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<T> msgAdd = new ArrayList<>();
|
|
|
+ List<T> msgModify = new ArrayList<>();
|
|
|
+ List<T> msgRemove = new ArrayList<>();
|
|
|
+ for (T obj : objs) {
|
|
|
+ T dbObj = map.get(obj.getId());
|
|
|
+ if (dbObj == null) {
|
|
|
+ if(obj.getValid().intValue() == ValidEnum.FALSE.getType())
|
|
|
+ continue;
|
|
|
+
|
|
|
+ obj.setCreationTime(timestamp);
|
|
|
+ obj.setCreator(AdmConst.CREATOR_APP);
|
|
|
+ setBdtpUploadProp(obj, dbObj, uploadFlag);
|
|
|
+
|
|
|
+ mapper.insert(obj);
|
|
|
+
|
|
|
+ msgAdd.add(obj);
|
|
|
+ } else {
|
|
|
+ long dbTs;
|
|
|
+ long ts;
|
|
|
+ if(dbObj.getModifiedTime() != null){
|
|
|
+ dbTs = dbObj.getModifiedTime().getMillis();
|
|
|
+ ts = obj.getModifiedTime().getMillis();
|
|
|
+ } else {
|
|
|
+ dbTs = dbObj.getCreationTime().getMillis();
|
|
|
+ ts = obj.getCreationTime().getMillis();
|
|
|
+ }
|
|
|
+ if (ts != dbTs) {
|
|
|
+ //TODO 时间戳不一致,离线数据无效,暂时跳过处理
|
|
|
+ expired.add(obj);
|
|
|
+ } else {
|
|
|
+ obj.setModifiedTime(timestamp);
|
|
|
+ obj.setModifier(AdmConst.CREATOR_APP);
|
|
|
+ setBdtpUploadProp(obj, dbObj, uploadFlag);
|
|
|
+
|
|
|
+ mapper.updateById(obj);
|
|
|
+
|
|
|
+ if(obj.getValid().intValue() == ValidEnum.FALSE.getType())
|
|
|
+ msgRemove.add(obj);
|
|
|
+ else
|
|
|
+ msgModify.add(obj);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ D2mMessage message = new D2mMessage();
|
|
|
+ message.setItemType(objectType);
|
|
|
+ message.setAddItems(msgAdd);
|
|
|
+ message.setModifyItems(msgModify);
|
|
|
+ message.setRemoveItems(msgRemove);
|
|
|
+ syncModel.sendMessageToModel(message);
|
|
|
+
|
|
|
+ return expired;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void setBdtpUploadProp(IAdmBdtpEntity obj, IAdmBdtpEntity dbObj, String uploadFlag){
|
|
|
+ obj.setUploadFlag(uploadFlag);
|
|
|
+ obj.setD2mState(ValidEnum.FALSE.getType());
|
|
|
+ obj.setDeliveryState(ValidEnum.FALSE.getType());
|
|
|
+ obj.setClientId(dbObj.getClientId());
|
|
|
+ obj.setClientDevice(dbObj.getClientDevice());
|
|
|
+ }
|
|
|
+
|
|
|
+ private <T extends BaseAdmDataEntity> List<T> uploadAdmData(List<T> objs, List<T> dbObjs, String uploadFlag, String timestamp, BaseMapper<T> mapper){
|
|
|
+ List<T> expired = new ArrayList<>();
|
|
|
+ HashMap<String, T> dbMap = new HashMap<>(dbObjs.size());
|
|
|
+ for(T dbObj : dbObjs) {
|
|
|
+ dbMap.put(dbObj.getId(), dbObj);
|
|
|
+ }
|
|
|
+
|
|
|
+ for (T obj : objs) {
|
|
|
+ T dbObj = dbMap.get(obj.getId());
|
|
|
+ if (dbObj == null) {
|
|
|
+ if(obj.getValid().intValue() == ValidEnum.FALSE.getType())
|
|
|
+ continue;
|
|
|
+
|
|
|
+ obj.setCreationTime(timestamp);
|
|
|
+ obj.setCreator(AdmConst.CREATOR_APP);
|
|
|
+ obj.setUploadFlag(uploadFlag);
|
|
|
+ mapper.insert(obj);
|
|
|
+ } else {
|
|
|
+ String dbTs;
|
|
|
+ String ts;
|
|
|
+ if(dbObj.getModifiedTime() != null){
|
|
|
+ dbTs = dbObj.getModifiedTime();
|
|
|
+ ts = obj.getModifiedTime();
|
|
|
+ } else {
|
|
|
+ dbTs = dbObj.getCreationTime();
|
|
|
+ ts = obj.getCreationTime();
|
|
|
+ }
|
|
|
+ if (!ts.equals(dbTs)) {
|
|
|
+ //TODO 时间戳不一致,离线数据无效,暂时跳过处理
|
|
|
+ expired.add(obj);
|
|
|
+ } else {
|
|
|
+ obj.setModifiedTime(timestamp);
|
|
|
+ obj.setModifier(AdmConst.CREATOR_APP);
|
|
|
+ obj.setUploadFlag(uploadFlag);
|
|
|
+ mapper.updateById(obj);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return expired;
|
|
|
+ }
|
|
|
+
|
|
|
+ private List<String> buildExpiredIds(List<? extends IAdmEntity> expired){
|
|
|
+ if(expired.size() > 0) {
|
|
|
+ List<String> ids = new ArrayList<>();
|
|
|
+ for(IAdmEntity entity : expired) {
|
|
|
+ ids.add(entity.getId());
|
|
|
+ }
|
|
|
+ return ids;
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ private <T extends IAdmEntity> List<T> serializeJsonProp(List<T> list){
|
|
|
+ for(IAdmEntity entity : list) {
|
|
|
+ entity.serializeJsonProp();
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
}
|