lrf402788946 3 years ago
parent
commit
b332336a4b
2 changed files with 1 additions and 2 deletions
  1. 1 1
      app/model/record.js
  2. 0 1
      app/service/customer.js

+ 1 - 1
app/model/record.js

@@ -6,7 +6,7 @@ const { ObjectId } = require('mongoose').Types;
 // 工作记录表
 const record = {
   customer_id: { type: ObjectId }, // 客服id
-  customer_name: { type: ObjectId }, // 客服名
+  customer_name: { type: String }, // 客服名
   client_id: { type: ObjectId }, // 客户id
   client_name: { type: String }, // 客户名
   _tenant: { type: String }, // 项目标识

+ 0 - 1
app/service/customer.js

@@ -185,7 +185,6 @@ class CustomerService extends CrudService {
   // 定时清理
   async clear() {
     // 所有状态和工作记录,对比失效时间,过了就删了
-    console.log('in function:clear');
     await this.status.deleteMany({ logout_time: { $lte: moment().format('YYYY-MM-DD HH:mm:ss') } });
     // await this.record.deleteMany({ out_time: { $lte: moment().format('YYYY-MM-DD HH:mm:ss') } });