uniStatPayResult.js 660 字节
Newer Older
study夏羽's avatar
study夏羽 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
/**
 * 数据库操作
 */
const BaseMod = require('../../base');
const dbName = require("./config");

class Dao extends BaseMod {

	constructor() {
		super()
		this.tablePrefix = false; // 不使用表前缀
	}

	async list(data) {
		let {
			whereJson,
		} = data;
		const dbRes = await this.getCollection(dbName.uniStatPayResult).where(whereJson).get();
		return dbRes.data;
	}

	async del(data) {
		let {
			whereJson
		} = data;
		const dbRes = await this.delete(dbName.uniStatPayResult, whereJson);
		return dbRes.deleted;
	}

	async adds(saveList) {
		return await this.batchInsert(dbName.uniStatPayResult, saveList);
	}
}


module.exports = new Dao();