1234567891011121314151617181920 |
- /**
- * Created by Tony on 2017/8/9.
- */
- import mongoose from "mongoose";
- let rpt_tpl_mdl = mongoose.model("rpt_templates");
- module.exports = {
- getRptTemplate: getRptTemplate,
- getRptTemplates: getRptTemplates
- };
- async function getRptTemplate(tplId) {
- //console.log('templateId: ' + parseInt(tplId));
- return await rpt_tpl_mdl.findOne({"ID": parseInt(tplId)}, '-_id');
- }
- async function getRptTemplates(tplIds) {
- //console.log('templateId: ' + parseInt(tplId));
- return await rpt_tpl_mdl.find({"ID": {"$in": tplIds}}, '-_id');
- }
|