rpt_template_facade.js 354 B

1234567891011121314
  1. /**
  2. * Created by Tony on 2017/8/9.
  3. */
  4. const mongoose = require("mongoose");
  5. let rpt_tpl_mdl = mongoose.model("rpt_templates");
  6. module.exports = {
  7. getRptTemplate: getRptTemplate
  8. };
  9. async function getRptTemplate(tplId) {
  10. //console.log('templateId: ' + parseInt(tplId));
  11. return await rpt_tpl_mdl.findOne({"ID": parseInt(tplId)}, '-_id');
  12. }