Browse Source

Merge branch 'master' of http://git.cc-lotus.info/service-platform/service-talent

liuyu 5 years ago
parent
commit
1097fb8d11

+ 6 - 3
app/controller/.column.js

@@ -1,7 +1,8 @@
 module.exports = {
   create: {
     requestBody: [
-      '!name'
+      '!name',
+      'site'
     ]
   },
   destroy: {
@@ -11,7 +12,8 @@ module.exports = {
   update: {
     params: ['!id'],
     requestBody: [
-      '!name'
+      '!name',
+      'site'
     ]
   },
   show: {
@@ -23,7 +25,8 @@ module.exports = {
   index: {
     parameters: {
       query: {
-        name: 'name'
+        name: 'name', 
+        site: 'site'
       }
     },
     service: 'query',

+ 2 - 2
app/controller/.experts.js

@@ -36,7 +36,7 @@ module.exports = {
   update: {
     params: ['!id'],
     requestBody: [
-      '!name',
+      'name',
       'imgpath',
       'gender',
       'nation',
@@ -73,7 +73,7 @@ module.exports = {
   index: {
     parameters: {
       query: {
-        name : '!name',
+        name : 'name',
         imgpath : 'imgpath',
         gender : 'gender',
         nation : 'nation',

+ 5 - 2
app/controller/.information.js

@@ -6,6 +6,7 @@ module.exports = {
       'content',
       'user_id',
       'user_name',
+      'column_id',
       'state'
     ]
   },
@@ -17,10 +18,11 @@ module.exports = {
     params: ['!id'],
     requestBody: [
       'infotype',
-      '!name',
+      'name',
       'content',
       'user_id',
       'user_name',
+      'column_id',
       'state'
     ]
   },
@@ -34,10 +36,11 @@ module.exports = {
     parameters: {
       query: {
         infotype :'infotype',
-        name :'!name',
+        name :'name',
         content :'content',
         user_id :'user_id',
         user_name :'user_name',
+        column_id: 'column_id',
         state :'state'
       }
     },

+ 5 - 2
app/controller/.recruitment.js

@@ -3,6 +3,7 @@ module.exports = {
     requestBody: [
       '!license',
       '!name',
+      'column_id',
       'salary',
       'job_nature',
       'profession',
@@ -23,6 +24,7 @@ module.exports = {
     requestBody: [
       'license',
       'name',
+      'column_id',
       'salary',
       'job_nature',
       'profession',
@@ -43,8 +45,9 @@ module.exports = {
   index: {
     parameters: {
       query: {
-        license :'!license',
-        name :'!name',
+        license :'license',
+        name :'name',
+        column_id: 'column_id',
         salary :'salary',
         job_nature :'job_nature',
         profession :'profession',

+ 6 - 6
app/controller/.resume.js

@@ -37,9 +37,9 @@ module.exports = {
   update: {
     params: ['!id'],
     requestBody: [
-      '!talents_userId',
-      '!title',
-      '!name',
+      'talents_userId',
+      'title',
+      'name',
       'imgpath',
       'gender',
       'nation',
@@ -75,9 +75,9 @@ module.exports = {
   index: {
     parameters: {
       query: {
-        talents_userId : '!talents_userId',
-        title : '!title',
-        name : '!name',
+        talents_userId : 'talents_userId',
+        title : 'title',
+        name : 'name',
         imgpath : 'imgpath',
         gender : 'gender',
         nation : 'nation',

+ 1 - 1
app/model/column.js

@@ -1,11 +1,11 @@
 'use strict';
 const Schema = require('mongoose').Schema;
 const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
-const { Secret } = require('naf-framework-mongoose/lib/model/schema');
 
 // 栏目表
 const ColumnSchema = {
   name: { type: String, required: true, maxLength: 500 }, // 栏目名称
+  site: { type: String, required: false, maxLength: 500 }, // 栏目位置
 };
 
 

+ 1 - 0
app/model/information.js

@@ -10,6 +10,7 @@ const InformationSchema = {
   content: { type: String, required: true }, // 正文
   user_id: { type: String, required: true, maxLength: 200 }, // 发布人id
   user_name: { type: String, required: true, maxLength: 200 }, // 发布人名称
+  column_id: { type: String, required: false, maxLength: 200 }, // 栏目id
   state: { type: String, required: false, maxLength: 200 }, // 状态,0-草稿,1-发布,2-删除
 };
 

+ 1 - 0
app/model/recruitment.js

@@ -7,6 +7,7 @@ const { Secret } = require('naf-framework-mongoose/lib/model/schema');
 const RecruitmentSchema = {
   license: { type: String, required: true, maxLength: 200 }, // 信用代码
   name: { type: String, required: true, maxLength: 500 }, // 招聘信息名称
+  column_id: { type: String, required: false, maxLength: 200 }, // 栏目id
   salary: { type: String, required: false, maxLength: 200 }, // 职位月薪
   job_nature: { type: String, required: false, maxLength: 200 }, // 工作性质,0-兼职,1-全职
   profession: { type: String, required: false, maxLength: 500 }, // 公司名称

+ 10 - 10
app/router.js

@@ -8,22 +8,22 @@ module.exports = app => {
   router.get('/', controller.home.index);
 
   // 栏目表设置路由
-  router.resources('column', '/api/column', controller.column); // index、create、show、destroy
-  router.post('column', '/api/column/update/:id', controller.column.update);
+  router.resources('column', '/api/talent/column', controller.column); // index、create、show、destroy
+  router.post('column', '/api/talent/column/update/:id', controller.column.update);
 
   // 简历表设置路由
-  router.resources('resume', '/api/resume', controller.resume); // index、create、show、destroy
-  router.post('resume', '/api/resume/update/:id', controller.resume.update);
+  router.resources('resume', '/api/talent/resume', controller.resume); // index、create、show、destroy
+  router.post('resume', '/api/talent/resume/update/:id', controller.resume.update);
 
   // 招聘信息表设置路由
-  router.resources('recruitment', '/api/recruitment', controller.recruitment); // index、create、show、destroy
-  router.post('recruitment', '/api/recruitment/update/:id', controller.recruitment.update);
+  router.resources('recruitment', '/api/talent/recruitment', controller.recruitment); // index、create、show、destroy
+  router.post('recruitment', '/api/talent/recruitment/update/:id', controller.recruitment.update);
 
   // 专家表设置路由
-  router.resources('experts', '/api/experts', controller.experts); // index、create、show、destroy
-  router.post('experts', '/api/experts/update/:id', controller.experts.update);
+  router.resources('experts', '/api/talent/experts', controller.experts); // index、create、show、destroy
+  router.post('experts', '/api/talent/experts/update/:id', controller.experts.update);
 
   // 参谋表设置路由
-  router.resources('information', '/api/information', controller.information); // index、create、show、destroy
-  router.post('information', '/api/information/update/:id', controller.information.update);
+  router.resources('information', '/api/talent/information', controller.information); // index、create、show、destroy
+  router.post('information', '/api/talent/information/update/:id', controller.information.update);
 };