|
|
@@ -467,8 +467,8 @@ ProjectsDAO.prototype.getGCFiles = async function (fileType, userID) {
|
|
|
return rst;
|
|
|
};
|
|
|
|
|
|
-ProjectsDAO.prototype.getFirstNodeID = async function (userID, pid) {
|
|
|
- let nodes = await Projects.find({userID: userID, ParentID: pid, deleteInfo: null});
|
|
|
+ProjectsDAO.prototype.getFirstNodeID = async function (userID, compilationId, pid) {
|
|
|
+ let nodes = await Projects.find({userID: userID, compilation: compilationId, ParentID: pid, deleteInfo: null});
|
|
|
if (nodes.length === 0) {
|
|
|
return -1;
|
|
|
}
|
|
|
@@ -499,7 +499,7 @@ ProjectsDAO.prototype.getFirstNodeID = async function (userID, pid) {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-ProjectsDAO.prototype.recGC = async function (userID, datas, callback) {
|
|
|
+ProjectsDAO.prototype.recGC = async function (userID, compilationId, datas, callback) {
|
|
|
let functions = [];
|
|
|
let updateDatas = [];
|
|
|
for (let i = 0, len = datas.length; i < len; i++) {
|
|
|
@@ -521,7 +521,7 @@ ProjectsDAO.prototype.recGC = async function (userID, datas, callback) {
|
|
|
datas[i].updateData.ParentID = -1;
|
|
|
}
|
|
|
}
|
|
|
- let firstNodeID = await this.getFirstNodeID(userID, projPid);
|
|
|
+ let firstNodeID = await this.getFirstNodeID(userID, compilationId, projPid);
|
|
|
datas[i].updateData.NextSiblingID = firstNodeID;
|
|
|
}
|
|
|
updateDatas.push(datas[i])
|