1234567891011121314151617181920212223242526272829 |
- /**
- * Created by Zhong on 2017/12/22.
- */
- let rationRepositoryModel = require('../../ration_repository/models/repository_map').Model;
- class CompleViewModel {
- async getRationLib(rationRepId, callback){
- try{
- let rationLib = await rationRepositoryModel.find({ID: rationRepId, $or: [{deleted: null}, {deleted: false}]});
- callback(0, rationLib);
- }
- catch(err) {
- callback(err, null);
- }
- }
- async getRationLibs(compilationId, callback){
- try{
- let rationLibs = await rationRepositoryModel.find({compilationId: compilationId, $or: [{deleted: null}, {deleted: false}]});
- callback(0, rationLibs);
- }
- catch(err) {
- callback(err, null);
- }
- }
- }
- export default CompleViewModel;
|