Commit 40334627 by 孙亚楠

dd

parent 3e6a7ceb
......@@ -22,6 +22,7 @@ module.exports = function (db, DataTypes) {
source_id: {type: DataTypes.BIGINT, field: 'source_id', allowNull: true, defaultValue:0, comment:'来源id' },
source_no: {type: DataTypes.STRING, field: 'source_no', allowNull: true, defaultValue:'', comment:'来源订单号' },
contact_mobile: {type: DataTypes.STRING, field: 'contact_mobile', allowNull: true, defaultValue:'', comment:'联系电话' },
customer_name: {type: DataTypes.STRING, field: 'customer_name', allowNull: true, defaultValue:'', comment:'客户名称' },
created_at: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW },
updated_at: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW },
deleted_at: { type: DataTypes.DATE, field: 'deleted_at', allowNull: true }
......
......@@ -24,6 +24,11 @@ class OorderService extends ServiceBase {
/**
* 新增渠道订单
* @returns {Promise<void>}
* @params product_id 产品ID
* @params source_id 来源ID
* @params source_no 来源订单号
* @params desc 订单信息
* @params contact_mobile 联系电话
*/
async addSourceOrder(params) {
// 整理参数
......@@ -39,6 +44,7 @@ class OorderService extends ServiceBase {
order.source_no = this.trim(params.source_no);
order.desc = this.trim(params.notes);
order.contact_mobile = this.trim(params.contact_mobile);
order.customer_name = this.trim(params.customer_name);
// 验证订单是否存在
let exists = await this.dao.findOne({ source_id: order.source_id, source_no: order.source_no });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment