明树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) {
if (!req.body.departId) {
return res.sendError(errorMessage.resourceNotFound);
} else {
//TODO: 查询当前部门所有子部门
search.include[1].where = { id: req.body.departId };
}
if (req.body.name) {
......
......@@ -150,8 +150,8 @@ User.hasMany(Project, { foreignKey: 'projectCreator', as: 'createdProjects' });
Project.belongsTo(User, { foreignKey: 'projectCreator', as: 'creator' });
/**项目-资源信息 1:n */
Resources.hasMany(ResourcesInfo, { foreignKey: 'resourceId', as: 'resourcesInfos' });
ResourcesInfo.belongsTo(Resources, { foreignKey: 'resourceId' });
// Resources.hasMany(ResourcesInfo, { foreignKey: 'resourceId', as: 'resourcesInfos' });
// ResourcesInfo.belongsTo(Resources, { foreignKey: 'resourceId' });
/**项目-核心边界条件 1:n */
......
......@@ -27,6 +27,9 @@ const Resources = sequelize.define('Resources', {
description: "1-平行化资源库 2-树形化资源库",
defaultValue: 1
},
dictId: {
type: DataTypes.STRING,
},
del: {
type: DataTypes.INTEGER,
......
......@@ -9,11 +9,11 @@ const ResourcesInfo = sequelize.define('ResourcesInfo', {
primaryKey: true,
autoIncrement: true
},
key: {
code: {
type: DataTypes.STRING,
comment: "资源库字段key"
},
parentkey: {
parentCode: {
type: DataTypes.STRING,
comment: "资源库key"
},
......@@ -33,6 +33,12 @@ const ResourcesInfo = sequelize.define('ResourcesInfo', {
comment: "排序字段",
defaultValue: 0
},
dictId: {
type: DataTypes.STRING,
},
fid: {
type: DataTypes.STRING,
},
resourceId: {
type: DataTypes.INTEGER,
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