Commit 46aae887 authored by yaobeibei's avatar yaobeibei

master merge oem

parents 44d4fbb0 85b1410d
......@@ -6,16 +6,6 @@ const moment = require('moment')
var reg = /@test.com$|@123.com$|@goyoo.com$|@xiaoyun.com$|^@|^test|@dis.com$|time-stone.cn$|^tangyong|^875652541|@1.com$|@xioayun.com$/i
var dbpath = null
// master test
if (process.env.MONGO) {
dbpath = process.env.MONGO || 'mongodb://10.11.3.123:1301/remarketing'
} else {
dbpath = 'mongodb://localhost:27017/remarketing'
}
var dbpath_oem = null
if (process.env.MONGO) {
......@@ -24,11 +14,7 @@ if (process.env.MONGO) {
dbpath_oem = 'mongodb://localhost:27017/remarketing2'
}
var db = {}
var db_oem_mtty = {}
mongoClient.connect(dbpath, function (err, res) {
mongoClient.connect(dbpath_oem, function (err, res) {
if (err) return console.log(err)
db = res.db('remarketing')
})
......@@ -745,20 +731,20 @@ app.post('/checkCall', async function (req, res) {
}
})
if (item.popover) {
if (choose === 'zero' && x.checkStatus === undefined) {
if (choose === 'zero' && x.oemCheckStatus === undefined) {
console.log(choose)
item.status = '未审核'
dataArr.push(item)
item = {}
}
if (choose === 'one' && x.checkStatus === 0) {
if (choose === 'one' && x.oemCheckStatus === 0) {
console.log(choose)
item.status = '审核未通过'
item.disable = true
dataArr.push(item)
item = {}
}
if (choose === 'two' && (x.checkStatus === 1)) {
if (choose === 'two' && (x.oemCheckStatus === 1)) {
console.log(choose)
item.status = '审核通过'
item.disable = true
......@@ -767,15 +753,15 @@ app.post('/checkCall', async function (req, res) {
}
if (choose === 'all') {
console.log(choose)
if (x.checkStatus === undefined) {
if (x.oemCheckStatus === undefined) {
item.status = '未审核'
item.disable = false
}
if (x.checkStatus === 0) {
if (x.oemCheckStatus === 0) {
item.status = '审核未通过'
item.disable = true
}
if (x.checkStatus === 1) {
if (x.oemCheckStatus === 1) {
item.status = '审核通过'
item.disable = true
}
......@@ -801,16 +787,17 @@ app.post('/send', async function (req, res) {
// getSession(sessionID, res)
if (status === 8) {
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $unset: { 'checkStatus': '' } })
res.send({ status: 200, message: '状态已重置' })
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $unset: { 'oemCheckStatus': '' } })
res.send({ status: 200, message: '状态已重置(防止误通过)' })
}
if (status === 0) {
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 0, pre: false, number: 0 } })
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'oemCheckStatus': 0, pre: false, number: 0 } })
res.send({ status: 200, message: '审核未通过' })
}
if (status === 1) {
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 1 } })
await db.collection('bills').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'oemCheckStatus': 1 } })
await db.collection('dspCallGroups').update({ '_id': mongodb.ObjectId(groupId) }, { $set: { 'interestlist': interestlist, 'hostlist': hostlist } })
res.send({ status: 200, message: '审核通过' })
}
......@@ -884,10 +871,10 @@ app.post('/getCheckNote', async function (req, res) {
}
})
if (operatorId + '' === '联通' + '' && (item.popover.operator === undefined || item.popover.operator === '联通' + '')) {
if (x.checkStatus === 0) {
if (x.oemCheckStatus === 0) {
item.status = '审核未通过'
item.disable = true
} else if (x.checkStatus === 1) {
} else if (x.oemCheckStatus === 1) {
item.status = '审核通过'
item.disable = true
} else {
......@@ -970,13 +957,13 @@ app.post('/sendCheckNote', async function (req, res) {
if (operatorId === '联通') {
await db.collection('dspTask').find({ '_id': mongodb.ObjectId(taskId) }).toArray(async (err, rep) => {
if (status === 1) {
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 0 } })
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'oemCheckStatus': 0 } })
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'status': 1 } })
await db.collection('bills').update({ taskID: mongodb.ObjectId(taskId), pre: true }, { $set: { pre: false, number: 0 } })
res.send({ status: 200, message: '审核未通过' })
}
if (status === 2) {
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'checkStatus': 1 } })
await db.collection('dspTask').update({ '_id': mongodb.ObjectId(taskId) }, { $set: { 'oemCheckStatus': 1 } })
res.send({ status: 200, message: '审核通过' })
}
})
......
<template>
<el-container>
<el-header>
<h4>账户权限控制</h4>
<h4>test</h4>
</el-header>
<el-main>
<el-row>
......
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