|
@@ -26,14 +26,14 @@ class ShopNoticeService extends CrudService {
|
|
|
const od = await this.orderDetailModel.findById(source_id);
|
|
|
if (!od) return;
|
|
|
const content = this.toSendMsg(_.get(od, 'no'));
|
|
|
- const obj = { shop: _.get(od, 'shop'), source: '1', source_id, time: moment().format('YYYY-MM-DD HH:mm:ss'), content, type };
|
|
|
+ const obj = { shop: _.get(od, 'shop'), source: '1', source_id, time: moment().format('YYYY-MM-DD HH:mm:ss'), content, type, source_type: '0' };
|
|
|
list.push(obj);
|
|
|
} else if (_.isArray(source_id)) {
|
|
|
for (const id of source_id) {
|
|
|
const od = await this.orderDetailModel.findById(id);
|
|
|
if (!od) continue;
|
|
|
const content = this.toSendMsg(_.get(od, 'no'));
|
|
|
- const obj = { shop: _.get(od, 'shop'), source: '1', source_id: id, time: moment().format('YYYY-MM-DD HH:mm:ss'), content, type };
|
|
|
+ const obj = { shop: _.get(od, 'shop'), source: '1', source_id: id, time: moment().format('YYYY-MM-DD HH:mm:ss'), content, type, source_type: '0' };
|
|
|
list.push(obj);
|
|
|
}
|
|
|
}
|
|
@@ -60,14 +60,14 @@ class ShopNoticeService extends CrudService {
|
|
|
const data = await this.afterSaleModel.findById(source_id);
|
|
|
const od = await this.orderDetailModel.findById(data.order_detail);
|
|
|
const content = this.toAfterSaleMsg(_.get(od, 'no'));
|
|
|
- const obj = { shop: _.get(data, 'shop'), source: '1', source_id, time: moment().format('YYYY-MM-DD HH:mm:ss'), content, type };
|
|
|
+ const obj = { shop: _.get(data, 'shop'), source: '1', source_id, time: moment().format('YYYY-MM-DD HH:mm:ss'), content, type, source_type: '1' };
|
|
|
list.push(obj);
|
|
|
} else if (_.isArray(source_id)) {
|
|
|
for (const id of source_id) {
|
|
|
const data = await this.afterSaleModel.findById(id);
|
|
|
const od = await this.orderDetailModel.findById(data.order_detail);
|
|
|
const content = this.toAfterSaleMsg(_.get(od, 'no'));
|
|
|
- const obj = { shop: _.get(data, 'shop'), source: '1', source_id: id, time: moment().format('YYYY-MM-DD HH:mm:ss'), content, type };
|
|
|
+ const obj = { shop: _.get(data, 'shop'), source: '1', source_id: id, time: moment().format('YYYY-MM-DD HH:mm:ss'), content, type, source_type: '1' };
|
|
|
list.push(obj);
|
|
|
}
|
|
|
}
|