guhongwei před 3 roky
rodič
revize
3dd2a8dce0

+ 3 - 0
app/controller/patent/.patenttechol.js

@@ -1,6 +1,7 @@
 module.exports = {
   create: {
     requestBody: [
+      "order_num",
       "describe",
       "urgent",
       "contact",
@@ -17,6 +18,7 @@ module.exports = {
   update: {
     params: ["!id"],
     requestBody: [
+      "order_num",
       "describe",
       "urgent",
       "contact",
@@ -35,6 +37,7 @@ module.exports = {
   index: {
     parameters: {
       query: {
+        order_num: "%order_num%",
         urgent: "%urgent%",
         contact: "%contact%",
         phone: "%phone%",

+ 2 - 0
app/model/patent/patenttechol.js

@@ -5,6 +5,7 @@ const metaPlugin = require('naf-framework-mongoose/lib/model/meta-plugin');
 const { ObjectId } = require('mongoose').Types;
 // 专利需求表
 const patenttechol = {
+  order_num: { type: String }, // 需求订单号
   describe: { type: String }, // 需求描述(用途)
   urgent: { type: String }, // 紧急程度
   contact: { type: String }, // 联系人
@@ -16,6 +17,7 @@ const patenttechol = {
 };
 const schema = new Schema(patenttechol, { toJSON: { virtuals: true } });
 schema.index({ id: 1 });
+schema.index({ order_num: 1 });
 schema.index({ urgent: 1 });
 schema.index({ contact: 1 });
 schema.index({ phone: 1 });