c_solution.js 566 B

123456789101112131415161718192021222324252627
  1. const {searchHandle} = require('../tools/searchSql');
  2. const {handle} = require('../tools/handle');
  3. const d_solution = require("../database/d_solution");
  4. const log = require("../logger").logger("c_solution","info")
  5. /**
  6. * 加载解决方案
  7. * @param key
  8. * @param p
  9. * @param l
  10. * @returns {Promise<*[]>}
  11. */
  12. async function loadSolution(key,p,l){
  13. p = p || 1;
  14. l = l || 10;
  15. let [err,res] = await handle(d_solution.loadSolution(key, p, l));
  16. if(err){
  17. console.log(err);
  18. return [err,null];
  19. }
  20. return [null,res];
  21. }
  22. module.exports = {
  23. loadSolution
  24. }