const db = require('../db');
async function task(argument) {
	const emails = [
	'858182656@qq.com',
	'jieline7@163.com',
	'tangyong@mobivans.com',
	'649406896@qq.com',
	'1874165638@qq.com',
	'2169551847@qq.com',
	'xiaoxing@careutrip.com',
	'bailu@vfast.com.cn',
	'wanghongjuan@sunlands.com',
	'3199882101@qq.com',
	'398607600@qq.com',
	'103171407@qq.com',
	'798195077@qq.com',
	'laurahe@ttledu.com',
	'1259598236@qq.com',
	'262632873@qq.com',
	'chencx@sanhao.com',
	'1906718345@qq.com',
	'27094666@qq.com',
	'565856097@qq.com',
	'service@dy-investment.com',
	'992488580@qq.com',
	'duanyinchu@meizhaike.com',
	'wanghuifeng@bonaol.com',
	'rerbada@163.com',
	'16348448@qq.com',
	'nq@puhuilicai.com',
	'yangwj@itaojin.cn',
	'2000@hb-360.com'];
	const fromID = "5b17941d6dea22000776a1cd";
	const from = '代理商平台-xiaoshou@xiaoyun.com';
	const account = await db.getCollection('account');


	const recognition = await db.getCollection('recognition');
	const dailyStats = await db.getCollection('dailyStats');
	const bills = await db.getCollection('bills');
	const callTask = await db.getCollection('callTask');
	const dspCallTask = await db.getCollection('dspCallTask');
	const dspRecognition = await db.getCollection('dspRecognition');

	const statistics = await db.getCollection('statistics');
	const task = await db.getCollection('task');
	console.dir(emails.length)
	let count = 0;
	emails.forEach( async item => {
		const rep = await account.update({email:item},{$set:{status:1}})
		/*let pubID = rep._id + '';
		const _rep = await account.update({accountID:rep._id},{$set:{status:1}},{multi:true});*/
		console.dir(rep.result.nModified);
		//console.dir(pubID);
	});
}

task();


