明树Git Lab

Commit eedc4e1a authored by zfp1's avatar zfp1

update

parent bbb3f6c7
Pipeline #104353 passed with stage
in 3 seconds
...@@ -150,6 +150,7 @@ async function getDepartUsers(req, res, next) { ...@@ -150,6 +150,7 @@ async function getDepartUsers(req, res, next) {
if (!req.body.departId) { if (!req.body.departId) {
return res.sendError(errorMessage.resourceNotFound); return res.sendError(errorMessage.resourceNotFound);
} else { } else {
//TODO: 查询当前部门所有子部门
search.include[1].where = { id: req.body.departId }; search.include[1].where = { id: req.body.departId };
} }
if (req.body.name) { if (req.body.name) {
......
...@@ -150,8 +150,8 @@ User.hasMany(Project, { foreignKey: 'projectCreator', as: 'createdProjects' }); ...@@ -150,8 +150,8 @@ User.hasMany(Project, { foreignKey: 'projectCreator', as: 'createdProjects' });
Project.belongsTo(User, { foreignKey: 'projectCreator', as: 'creator' }); Project.belongsTo(User, { foreignKey: 'projectCreator', as: 'creator' });
/**项目-资源信息 1:n */ /**项目-资源信息 1:n */
Resources.hasMany(ResourcesInfo, { foreignKey: 'resourceId', as: 'resourcesInfos' }); // Resources.hasMany(ResourcesInfo, { foreignKey: 'resourceId', as: 'resourcesInfos' });
ResourcesInfo.belongsTo(Resources, { foreignKey: 'resourceId' }); // ResourcesInfo.belongsTo(Resources, { foreignKey: 'resourceId' });
/**项目-核心边界条件 1:n */ /**项目-核心边界条件 1:n */
......
...@@ -27,6 +27,9 @@ const Resources = sequelize.define('Resources', { ...@@ -27,6 +27,9 @@ const Resources = sequelize.define('Resources', {
description: "1-平行化资源库 2-树形化资源库", description: "1-平行化资源库 2-树形化资源库",
defaultValue: 1 defaultValue: 1
}, },
dictId: {
type: DataTypes.STRING,
},
del: { del: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
......
...@@ -9,11 +9,11 @@ const ResourcesInfo = sequelize.define('ResourcesInfo', { ...@@ -9,11 +9,11 @@ const ResourcesInfo = sequelize.define('ResourcesInfo', {
primaryKey: true, primaryKey: true,
autoIncrement: true autoIncrement: true
}, },
key: { code: {
type: DataTypes.STRING, type: DataTypes.STRING,
comment: "资源库字段key" comment: "资源库字段key"
}, },
parentkey: { parentCode: {
type: DataTypes.STRING, type: DataTypes.STRING,
comment: "资源库key" comment: "资源库key"
}, },
...@@ -33,6 +33,12 @@ const ResourcesInfo = sequelize.define('ResourcesInfo', { ...@@ -33,6 +33,12 @@ const ResourcesInfo = sequelize.define('ResourcesInfo', {
comment: "排序字段", comment: "排序字段",
defaultValue: 0 defaultValue: 0
}, },
dictId: {
type: DataTypes.STRING,
},
fid: {
type: DataTypes.STRING,
},
resourceId: { resourceId: {
type: DataTypes.INTEGER, type: DataTypes.INTEGER,
comment: "所属资源库ID", comment: "所属资源库ID",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment