uniStatPayResult.js 660 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * 数据库操作
  3. */
  4. const BaseMod = require('../../base');
  5. const dbName = require("./config");
  6. class Dao extends BaseMod {
  7. constructor() {
  8. super()
  9. this.tablePrefix = false; // 不使用表前缀
  10. }
  11. async list(data) {
  12. let {
  13. whereJson,
  14. } = data;
  15. const dbRes = await this.getCollection(dbName.uniStatPayResult).where(whereJson).get();
  16. return dbRes.data;
  17. }
  18. async del(data) {
  19. let {
  20. whereJson
  21. } = data;
  22. const dbRes = await this.delete(dbName.uniStatPayResult, whereJson);
  23. return dbRes.deleted;
  24. }
  25. async adds(saveList) {
  26. return await this.batchInsert(dbName.uniStatPayResult, saveList);
  27. }
  28. }
  29. module.exports = new Dao();