guhongwei il y a 3 ans
Parent
commit
fc14100744
2 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 3 3
      app/controller/patent/.tradeorder.js
  2. 1 1
      app/model/patent/tradeorder.js

+ 3 - 3
app/controller/patent/.tradeorder.js

@@ -1,7 +1,7 @@
 module.exports = {
   create: {
     requestBody: [
-      "order_id",
+      "order_num",
       "buyer_id",
       "buyer_contacts",
       "buyer_phone",
@@ -20,7 +20,7 @@ module.exports = {
   update: {
     params: ["!id"],
     requestBody: [
-      "order_id",
+      "order_num",
       "buyer_id",
       "buyer_contacts",
       "buyer_phone",
@@ -41,7 +41,7 @@ module.exports = {
   index: {
     parameters: {
       query: {
-        order_id: "order_id",
+        order_num: "order_num",
         buyer_contacts: "buyer_contacts",
         buyer_phone: "buyer_phone",
         buyer_email: "buyer_email",

+ 1 - 1
app/model/patent/tradeorder.js

@@ -31,7 +31,7 @@ const purchases = new Schema({
 });
 // 订单表
 const tradeorder = {
-  order_id: { type: ObjectId }, // 订单id
+  order_num: { type: String }, // 订单id
   buyer_id: { type: ObjectId }, // 买家id
   buyer_contacts: { type: String }, // 买家联系人
   buyer_phone: { type: String }, // 买家手机号