lrf402788946 пре 4 година
родитељ
комит
5ed3e842d8
3 измењених фајлова са 2 додато и 33 уклоњено
  1. 2 0
      app/controller/patent/.disclosure.js
  2. 0 32
      app/model/patent/mechanism.js
  3. 0 1
      app/service/patent/disclosure.js

+ 2 - 0
app/controller/patent/.disclosure.js

@@ -16,6 +16,7 @@ module.exports = {
       "is_mech",
       "is_mech",
       "mechanism_id",
       "mechanism_id",
       "mechanism_name",
       "mechanism_name",
+      'status'
     ],
     ],
   },
   },
   destroy: {
   destroy: {
@@ -40,6 +41,7 @@ module.exports = {
       "is_mech",
       "is_mech",
       "mechanism_id",
       "mechanism_id",
       "mechanism_name",
       "mechanism_name",
+      'status'
     ],
     ],
   },
   },
   show: {
   show: {

+ 0 - 32
app/model/patent/mechanism.js

@@ -1,32 +0,0 @@
-'use strict';
-const Schema = require('mongoose').Schema;
-const moment = require('moment');
-const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
-const { ObjectId } = require('mongoose').Types;
-const { Secret } = require('naf-framework-mongoose/lib/model/schema');
-// 机构表
-const mechanism = {
-  name: { type: String }, // 机构名
-  contacts: { type: String }, // 联系人
-  phone: { type: String }, // 联系电话
-  passwd: { type: Secret, select: false }, // 密码
-  email: { type: String }, // 电子邮箱
-  address: { type: String }, // 联系地址
-  industry: { type: String }, // 所属行业
-  // 21-05-07添加区字段
-  juris: { type: String }, // 辖区
-  status: { type: String, required: false, default: '0', maxLength: 200 }, // 审核状态,0-注册,1-通过,2-拒绝
-  isdel: { type: String, required: false, default: '0' }, // 0=>未删除;1=>已删除
-  remark: { type: String },
-  create_time: { type: String, default: moment(new Date()).format('YYYY-MM-DD HH:mm:ss') },
-};
-const schema = new Schema(mechanism, { toJSON: { virtuals: true } });
-schema.index({ id: 1 });
-schema.index({ name: 1 });
-schema.index({ industry: 1 });
-schema.index({ 'meta.createdAt': 1 });
-schema.plugin(metaPlugin);
-module.exports = app => {
-  const { mongoose } = app;
-  return mongoose.model('PatentMechanism', schema, 'patent_mechanism');
-};

+ 0 - 1
app/service/patent/disclosure.js

@@ -20,7 +20,6 @@ class DisclosureService extends CrudService {
    * @property info 其他数据,当做多个备注,记录使用
    * @property info 其他数据,当做多个备注,记录使用
    */
    */
   async check({ id, status, remark }) {
   async check({ id, status, remark }) {
-    console.log(remark);
     await this.model.updateOne({ id }, { status });
     await this.model.updateOne({ id }, { status });
     // 换成对应的状态码,record在下面
     // 换成对应的状态码,record在下面
     return await this.record({ id, status, remark });
     return await this.record({ id, status, remark });