Commit 03cf05e4 by 孙亚楠

dd

parent dd7f97dd
......@@ -7,7 +7,7 @@ const moment = require("moment");
class OorderService extends ServiceBase {
constructor() {
super("order", ServiceBase.getDaoName(OorderService));
this.redisClient =system.getObject("util.redisClient");
this.oorderinforegDao = system.getObject("db.order.oorderinforegDao");
this.oorderdeliverDao = system.getObject("db.order.oorderdeliverDao");
this.oorderprocessDao = system.getObject("db.order.oorderprocessDao");
......@@ -42,7 +42,7 @@ class OorderService extends ServiceBase {
};
order.product_id = Number(params.product_id);
order.source_id = Number(params.source_id);
order.source_no = this.trim(params.source_no);
order.source_no =params.source_no || await this.redisClient.genrateId("gongsibao_order");
order.desc = this.trim(params.notes);
order.contact_mobile = this.trim(params.contact_mobile);
order.customer_name = this.trim(params.customer_name);
......@@ -52,7 +52,6 @@ class OorderService extends ServiceBase {
if (exists) {
return system.getResult(null, `订单号${order.source_no}已存在`);
}
// 验证来源
let source = await this.osourceDao.findById(order.source_id);
if (!source) {
......
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