Prechádzať zdrojové kódy

快递类型字段不修改

lrf 2 rokov pred
rodič
commit
3e20f76d2f

+ 2 - 2
app/model/trade/afterSale.js

@@ -4,10 +4,10 @@ const metaPlugin = require('naf-framework-mongoose-free/lib/model/meta-plugin');
 const MoneyPlugin = require('naf-framework-mongoose-free/lib/model/type-money-plugin');
 const transport = {
   customer_transport_no: { type: String, zh: '客户的快递单号' },
-  customer_transport_company: { type: String, zh: '客户的快递公司' },
+  customer_transport_type: { type: String, zh: '客户的快递公司' },
   customer_receive: { type: Boolean, zh: '客户是否签收' },
   shop_transport_no: { type: String, zh: '店家的快递单号' },
-  shop_transport_company: { type: String, zh: '店家的快递公司' },
+  shop_transport_type: { type: String, zh: '店家的快递公司' },
   shop_receive: { type: Boolean, zh: '店铺是否签收' },
 };
 // 售后进度

+ 1 - 1
app/model/trade/orderDetail.js

@@ -1,7 +1,7 @@
 'use strict';
 const transport = {
   shop_transport_no: '运单号',
-  shop_transport_company: '快递公司类型',
+  shop_transport_type: '快递公司类型',
 };
 
 const Schema = require('mongoose').Schema;

+ 5 - 5
app/service/trade/afterSale.js

@@ -473,15 +473,15 @@ class AfterSaleService extends CrudService {
     if (!data) throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '未找到售后数据');
     const { transport } = data;
     if (!transport) return;
-    const { customer_transport_no, customer_transport_company, shop_transport_no, shop_transport_company } = transport;
+    const { customer_transport_no, customer_transport_type, shop_transport_no, shop_transport_type } = transport;
     const result = {};
-    if (customer_transport_no && customer_transport_company) {
-      const q = { no: customer_transport_no, type: customer_transport_company };
+    if (customer_transport_no && customer_transport_type) {
+      const q = { no: customer_transport_no, type: customer_transport_type };
       const customer = await this.ctx.service.util.kd100.search(q);
       result.customer = customer;
     }
-    if (shop_transport_no && shop_transport_company) {
-      const q = { no: shop_transport_no, type: shop_transport_company };
+    if (shop_transport_no && shop_transport_type) {
+      const q = { no: shop_transport_no, type: shop_transport_type };
       const shop = await this.ctx.service.util.kd100.search(q);
       result.shop = shop;
     }

+ 1 - 1
app/service/trade/orderDetail.js

@@ -21,7 +21,7 @@ class OrderDetailService extends CrudService {
     const orderDetail = await this.model.findById(id);
     if (!id) throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '未找到订单信息');
     const { transport = {} } = orderDetail;
-    const { shop_transport_no: no, shop_transport_company: type } = transport;
+    const { shop_transport_no: no, shop_transport_type: type } = transport;
     if (!no || !type) throw new BusinessError(ErrorCode.DATA_NOT_EXIST, '缺少快递信息');
     const res = await this.ctx.service.util.kd100.search({ no, type });
     return res;