mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-12-02 03:48:05 +08:00
JSONField
This commit is contained in:
parent
68dc286a6d
commit
7ba61385aa
@ -32,7 +32,7 @@ public class OutGivingModel extends BaseModel {
|
||||
/**
|
||||
* 临时缓存
|
||||
*/
|
||||
@JSONField(serialize = false)
|
||||
@JSONField(serialize = false, deserialize = false)
|
||||
private Map<NodeModel, JSONObject> tempCacheMap;
|
||||
/**
|
||||
* 是否为单独创建的分发项目
|
||||
|
@ -1,7 +1,6 @@
|
||||
package io.jpom.service.node;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.jpom.common.BaseOperService;
|
||||
import io.jpom.model.data.OutGivingModel;
|
||||
import io.jpom.model.data.OutGivingNodeProject;
|
||||
@ -25,27 +24,6 @@ public class OutGivingServer extends BaseOperService<OutGivingModel> implements
|
||||
super(ServerConfigBean.OUTGIVING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addItem(OutGivingModel outGivingModel) {
|
||||
// 不保存临时数据
|
||||
JSONObject jsonObject = outGivingModel.toJson();
|
||||
jsonObject.remove("tempCacheMap");
|
||||
OutGivingModel newData = jsonObject.toJavaObject(OutGivingModel.class);
|
||||
newData.setTempCacheMap(null);
|
||||
// 保存
|
||||
super.addItem(newData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateItem(OutGivingModel outGivingModel) {
|
||||
// 不保存临时数据
|
||||
JSONObject jsonObject = outGivingModel.toJson();
|
||||
jsonObject.remove("tempCacheMap");
|
||||
OutGivingModel newData = jsonObject.toJavaObject(OutGivingModel.class);
|
||||
newData.setTempCacheMap(null);
|
||||
super.updateItem(newData);
|
||||
}
|
||||
|
||||
public boolean checkNode(String nodeId) {
|
||||
List<OutGivingModel> list = list();
|
||||
if (list == null || list.isEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user