Commit a0d3fa5d by 王昆

gsb

parent 39a34f03
...@@ -6,13 +6,11 @@ module.exports = function (db, DataTypes) { ...@@ -6,13 +6,11 @@ module.exports = function (db, DataTypes) {
return db.define('oorder', { return db.define('oorder', {
merchantId: {type: DataTypes.STRING, field: 'merchant_id', allowNull: true, defaultValue:'',comment:'商户id, 为了兼容司机宝' }, merchantId: {type: DataTypes.STRING, field: 'merchant_id', allowNull: true, defaultValue:'',comment:'商户id, 为了兼容司机宝' },
channelOrderNo: {type: DataTypes.STRING, field: 'order_id', allowNull: true, comment:'订单ID' }, channelOrderNo: {type: DataTypes.STRING, field: 'order_id', allowNull: true, comment:'订单ID' },
type: { type: DataTypes.INTEGER, field: 'type', allowNull: true, defaultValue:0, comment:'订单类型'},
busiType: {type: DataTypes.STRING, field: 'busi_type', allowNull: true,defaultValue:'', comment:'业务类型 1个体户 2...暂不知道' }, busiType: {type: DataTypes.STRING, field: 'busi_type', allowNull: true,defaultValue:'', comment:'业务类型 1个体户 2...暂不知道' },
busiId: { type: DataTypes.STRING, field: 'busi_id', allowNull: false,defaultValue:'', comment:'业务id'}, busiId: { type: DataTypes.STRING, field: 'busi_id', allowNull: false,defaultValue:'', comment:'业务id'},
productId: {type: DataTypes.BIGINT, field: 'product_id', allowNull: true,defaultValue:0, comment:'产品id'}, productId: {type: DataTypes.BIGINT, field: 'product_id', allowNull: true,defaultValue:0, comment:'产品id'},
price: { type: DataTypes.BIGINT, field: 'price', allowNull: true, defaultValue:0,comment:'订单价格'}, price: { type: DataTypes.BIGINT, field: 'price', allowNull: true, defaultValue:0,comment:'订单价格'},
status: {type: DataTypes.INTEGER, field: 'status', allowNull: true, defaultValue:'0',comment:'订单状态 1待分配 2待完善信息' }, status: {type: DataTypes.INTEGER, field: 'status', allowNull: true, defaultValue:'0',comment:'订单状态' },
processStatus: { type: DataTypes.STRING, field: 'process_status', allowNull: true, defaultValue:'0', comment:'业务状态 关联o_order_process表'},
assignTime: {type: DataTypes.DATE, field: 'assign_time', allowNull: true, defaultValue:null, comment:'分配时间' }, assignTime: {type: DataTypes.DATE, field: 'assign_time', allowNull: true, defaultValue:null, comment:'分配时间' },
assignUserId: {type: DataTypes.BIGINT, field: 'assign_user_id', allowNull: true, defaultValue:'0', comment:'分配人id' }, assignUserId: {type: DataTypes.BIGINT, field: 'assign_user_id', allowNull: true, defaultValue:'0', comment:'分配人id' },
deliverId: {type: DataTypes.STRING, field: 'deliver_id', allowNull: true, defaultValue:'', comment:'交付商id common微服务下' }, deliverId: {type: DataTypes.STRING, field: 'deliver_id', allowNull: true, defaultValue:'', comment:'交付商id common微服务下' },
...@@ -23,6 +21,7 @@ module.exports = function (db, DataTypes) { ...@@ -23,6 +21,7 @@ module.exports = function (db, DataTypes) {
serviceRemark: {type: DataTypes.STRING, field: 'service_remark', allowNull: true, defaultValue:'', comment:'服务信息备注' }, serviceRemark: {type: DataTypes.STRING, field: 'service_remark', allowNull: true, defaultValue:'', comment:'服务信息备注' },
sourceId: {type: DataTypes.BIGINT, field: 'source_id', allowNull: true, defaultValue:0, comment:'来源id' }, sourceId: {type: DataTypes.BIGINT, field: 'source_id', allowNull: true, defaultValue:0, comment:'来源id' },
sourceNo: {type: DataTypes.STRING, field: 'source_no', allowNull: true, defaultValue:'', comment:'来源订单号' }, sourceNo: {type: DataTypes.STRING, field: 'source_no', allowNull: true, defaultValue:'', comment:'来源订单号' },
contactMobile: {type: DataTypes.STRING, field: 'contact_mobile', allowNull: true, defaultValue:'', comment:'联系电话' },
createdAt: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW }, createdAt: { type: DataTypes.DATE, field: 'created_at', allowNull: false, defaultValue: DataTypes.NOW },
updatedAt: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW }, updatedAt: { type: DataTypes.DATE, field: 'updated_at', allowNull: false, defaultValue: DataTypes.NOW },
deletedAt: { type: DataTypes.DATE, field: 'deleted_at', allowNull: true } deletedAt: { type: DataTypes.DATE, field: 'deleted_at', allowNull: true }
......
...@@ -15,8 +15,25 @@ class OorderService extends ServiceBase { ...@@ -15,8 +15,25 @@ class OorderService extends ServiceBase {
*/ */
async addSourceOrder(params) { async addSourceOrder(params) {
// 整理参数 // 整理参数
let productId = Number(params.productId); let order = {
let sourceId = Number(params.sourceId); merchantId : "",
channelOrderNo: "",
busi_type: 1,
busi_id: "",
price: 0,
};
order.productId = Number(params.productId);
order.sourceId = Number(params.sourceId);
order.sourceNo = this.trim(params.sourceNo);
order.notes = this.trim(params.notes);
order.contactMobile = this.trim(params.contactMobile);
......
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