Browse Source

添加拆分订单表字段:transport_type快递类型

lrf 2 years ago
parent
commit
86e46a1d01
2 changed files with 4 additions and 0 deletions
  1. 2 0
      app/controller/trade/config/.orderDetail.js
  2. 2 0
      app/model/trade/orderDetail.js

+ 2 - 0
app/controller/trade/config/.orderDetail.js

@@ -19,6 +19,7 @@ module.exports = {
       'address',
       'no',
       'transport',
+      'transport_type',
       'goods',
       'total_detail',
       'buy_time',
@@ -52,6 +53,7 @@ module.exports = {
         group: 'group',
         out_bill: 'out_bill',
         goods: '%goods.goods.name%',
+        transport_type: 'transport_type',
       },
       // options: {
       //   "meta.state": 0 // 默认条件

+ 2 - 0
app/model/trade/orderDetail.js

@@ -30,6 +30,7 @@ const orderDetail = {
   group: { type: String, required: false, zh: '所属团', ref: 'Group.Group' }, //
   out_bill: { type: String, required: false, default: '1', zh: '是否出账' }, // 字典:tf
   inviter: { type: String, required: false, zh: '推荐商品人', ref: 'User.User' }, // 返现部分
+  transport_type: { type: String, required: false, zh: '快递类型' }, // 字典:transport_type
 };
 const schema = new Schema(orderDetail, { toJSON: { getters: true, virtuals: true } });
 schema.index({ id: 1 });
@@ -46,6 +47,7 @@ schema.index({ type: 1 });
 schema.index({ group: 1 });
 schema.index({ out_bill: 1 });
 schema.index({ inviter: 1 });
+schema.index({ transport_type: 1 });
 
 schema.plugin(metaPlugin);