|
@@ -1,8 +1,8 @@
|
|
|
'use strict';
|
|
|
|
|
|
const assert = require('assert');
|
|
|
-const _ = require('lodash');
|
|
|
-const { ObjectId } = require('mongoose').Types;
|
|
|
+// const _ = require('lodash');
|
|
|
+// const { ObjectId } = require('mongoose').Types;
|
|
|
const { CrudService } = require('naf-framework-mongoose/lib/service');
|
|
|
// const { BusinessError, ErrorCode } = require('naf-core').Error;
|
|
|
|
|
@@ -17,9 +17,9 @@ class PersonroomService extends CrudService {
|
|
|
assert(seller_id, '缺少卖家信息');
|
|
|
assert(buyer_name, '缺少买家信息');
|
|
|
assert(seller_name, '缺少卖家信息');
|
|
|
- //先查询是否有该房间
|
|
|
+ // 先查询是否有该房间
|
|
|
let res = await this.model.findOne({ buyer_id, seller_id });
|
|
|
- if(!res) res = await this.model.create({ buyer_id, seller_id, buyer_name, seller_name });
|
|
|
+ if (!res) res = await this.model.create({ buyer_id, seller_id, buyer_name, seller_name });
|
|
|
// TODO MQ
|
|
|
const { mq } = this.ctx;
|
|
|
if (mq) {
|